簡體   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