簡體   English   中英

npm 安裝:反應腳本安裝失敗

[英]npm install: react-scripts install fails

我有以下(簡化的)package.json 文件:

`{
  "name": "cotd",
  "version": "0.0.3",
  "private": true,
  "dependencies": {},
  "devDependencies": {
    "react-scripts": "3.2.0"
  },
  "scripts": {
    "dev": "react-scripts start",
    "start": "react-scripts start"
  },
  "browserslist": [
    ">0.2%",
    "not ie <= 11",
    "not op_mini all"
  ]
}`

當我嘗試使用npm install它時,安裝它失敗了幾次(首先是一些關於不推薦使用的依賴項的警告,最后是幾個 npm ERR.代碼(見下文),我試圖刪除 node_modules 文件夾,嘗試npm cache clear --force , 他們都沒有幫助. 這是 npm 安裝的 output :

$ npm install
npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated core-js@2.6.10: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN ts-pnp@1.1.4 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code EBUSY
npm ERR! syscall rename
npm ERR! path D:\MyEverything\Dropbox\Learning\WesBos\react-for-beginners\catch-of-the-day\node_modules\async\package.json.541798468
npm ERR! dest D:\MyEverything\Dropbox\Learning\WesBos\react-for-beginners\catch-of-the-day\node_modules\async\package.json
npm ERR! errno -4082
npm ERR! EBUSY: resource busy or locked, rename 'D:\MyEverything\Dropbox\Learning\WesBos\react-for-beginners\catch-of-the-day\node_modules\async\package.json.541798468' -> 'D:\MyEverything\Dropbox\Learning\WesBos\react-for-beginners\catch-of-the-day\node_modules\async\package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\andra\AppData\Roaming\npm-cache\_logs\2019-11-17T19_03_36_237Z-debug.log

操作系統:Win10 家庭版,64 位節點:v13.1.0 npm:6.12.1

任何想法我做錯了什么?

謝謝!

因此,Dropbox 同步似乎是有罪的,它在npm install期間鎖定了 npm 不喜歡的東西。 我將文件夾從我的保管箱文件夾中移出,然后......驚喜,驚喜......就像魅力一樣。

現在的任務是找到一種解決方案,從同步中選擇性地排除子文件夾(dropbox 不支持類似.gitignore 的解決方案),但這與 javascript 或 node 或 npm 無關...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM