Javascript npm安装:react脚本安装失败
我有以下(简化的)package.json文件:Javascript npm安装:react脚本安装失败,javascript,reactjs,npm-install,react-scripts,Javascript,Reactjs,Npm Install,React Scripts,我有以下(简化的)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"
`{
"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"
]
}`
操作系统:Win10 home,64位
节点:v13.1.0
净现值:6.12.1
知道我做错了什么吗
谢谢 看来,Dropbox synch是罪魁祸首,它在npm安装期间锁定了npm不喜欢的东西。 我把文件夹从dropbox文件夹移到了外面,然后。。。惊喜,惊喜。。。工作很有魅力
现在的任务是找到一个有选择地从同步中排除子文件夹的解决方案(dropbox不支持类似.gitignore的解决方案),但这与javascript、node或npm无关…基本上,如果node抛出lock、rename、delete错误,这意味着它试图重命名由于某种原因被OS锁定的资源。我在.npmrc文件中使用了缓存和前缀选项,它解决了许多节点的重命名和删除问题。添加两个名为“prefix”和“cache”的条目,其值应为当前文件夹节点模块文件夹之外的有效文件夹路径。我的指向
cache=“c:\\workspace\\temp\\npm cache”prefix=“c:\\workspace\\npm”
的要点感谢您的提示,虽然它并没有解决我的问题,但给了我一个解决方案的思路。。。见下文。。。
$ 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