Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prop-types version dependency for scrollbar #161

Open
shkadiyam opened this issue Nov 10, 2020 · 1 comment
Open

prop-types version dependency for scrollbar #161

shkadiyam opened this issue Nov 10, 2020 · 1 comment

Comments

@shkadiyam
Copy link

While using this package if we do not specify prop-type (15.0.0) as peer dependency, we are seeing this error, and it is forcing us to include that as peer dependency in our project, can we remove it from peer dependency?

src/index.jsx � dist/index.cjs.js, dist/index.esm.js...
babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers
[!] Error: 'oneOf' is not exported by node_modules/prop-types/index.js, imported by node_modules/react-scrollbars-custom/dist/rsc.esm.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/react-scrollbars-custom/dist/rsc.esm.js (2:9)
1: import { cnb } from 'cnbuilder';
2: import { oneOf, func, bool, number, string, object } from 'prop-types';
            ^
3: import { createElement, createRef, Component, createContext } from 'react';
4: import { zoomLevel } from 'zoom-level';
Error: 'oneOf' is not exported by node_modules/prop-types/index.js, imported by node_modules/react-scrollbars-custom/dist/rsc.esm.js
    at error (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:5251:30)
    at Module.error (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:9810:16)
    at handleMissingExport (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:9699:28)
    at Module.traceVariable (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:10200:24)
    at ModuleScope.findVariable (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:8731:39)
    at Identifier$1.bind (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:4137:40)
    at CallExpression$1.bind (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:2867:23)
    at CallExpression$1.bind (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:6628:15)
    at VariableDeclarator.bind (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:2867:23)
    at VariableDeclaration.bind (/var/jenkins/workspace/react-foundation_14_63014_1/node_modules/rollup/dist/shared/rollup.js:2863:31)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[Pipeline] }
@xobotyi
Copy link
Owner

xobotyi commented Dec 9, 2020

No, since package uses prop-types - it has to be installed. There is no reason to make prop-types a direct dependency, it is made to avoid bundling several versions of prop-types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants