我在 ReactJS 模块上使用 react-select,我需要进行一些更改以满足我的需求。
但是现在,我尝试使用 NPM 安装我自己的 fork,但它不起作用。
错误信息:
Module not found: Error: Can't resolve 'react-select'
尝试使用 gitpkg 和以下命令,但没有成功。
npm install 'willnaoosmith/react-select'
npm install 'https://gitpkg.now.sh/willnaoosmith/react-select/packages/react-select?master'
npm install -B 'willnaoosmith/react-select'
该模块使用 TypeScript,我的机会就在
packages/react-select
。
当我尝试使用
npm install 'willnaoosmith/react-select'
安装它时,它会在我的 package.json 上创建一个 @react-select/monorepo
条目
当我尝试使用
npm install 'https://gitpkg.now.sh/willnaoosmith/react-select/packages/react-select?master'
安装时,它不会在 dist
内的目录中创建
node_modules/react-select/packages/react-select/
文件夹
我错过了什么?
解决方案:必须发布我自己的包版本。 再见