Skip to content

prop-types version dependency for scrollbar  #92

@shkadiyam

Description

@shkadiyam

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] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions