繁体   English   中英

在我的 node_modules 中安装了未识别的包

[英]Unidentified package installing in my node_modules

有一个名为phantomjs-prebuilt@2.1.16的包不断安装在我的 node_modules 文件夹中,我无法找到跟踪它的方法以了解它的来源。 这个包已经被弃用了,当我尝试对我的 nextjs 项目进行 docker 化时它会抛出错误。 错误告诉我这个包没有我的体系结构arm64的二进制文件(我有一个 M1 MacOS):

102.1 [4/4] Building fresh packages...
104.7 error /usr/src/app/node_modules/phantomjs-prebuilt: Command failed.
104.7 Exit code: 1
104.7 Command: node install.js
104.7 Arguments: 
104.7 Directory: /usr/src/app/node_modules/phantomjs-prebuilt
104.7 Output:
104.7 PhantomJS not found on PATH
104.7 Unexpected platform or architecture: linux/arm64
104.7 It seems there is no binary available for your platform/architecture
104.7 Try to install PhantomJS globally

但这并不影响我,我只想删除它或跟踪安装它的依赖项。 有没有办法做到这一点? 我已经尝试过yarn list但它只显示了这个包的依赖关系,而不是安装它的那个:

├─ phantomjs-prebuilt@2.1.16
│  ├─ fs-extra@1.0.0
│  └─ jsonfile@2.4.0
✨  Done in 0.39s.

任何帮助表示赞赏。 谢谢你!

如果您使用的是纱线,请尝试:

yarn why phantomjs-prebuilt

文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM