看到大家说 npm ci
比 npm install
运行速度快,但是需要目录下有 package-lock.json
但是执行了 npm ci
却报错如下:
> fsevents@1.2.11 install D:\a_git_working\smartcampus_pc\office\node_modules\fsevents
> node-gyp rebuild
D:\a_git_working\smartcampus_pc\office\node_modules\fsevents>if not defined npm_config_node_gyp (node "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 547, in main
return gyp_main(args)
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2024, in GenerateOutput
sln_projects, project_objects, flat=msvs_version.FlatSolution())
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1781, in _GatherSolutionFolders
return _DictsToFolders('', root, flat)
File "D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1734, in _DictsToFolders
for folder, contents in bucket.items():
AttributeError: 'MSVSProject' object has no attribute 'items'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (D:\Diesel.Program\nvm\v10.17.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "D:\\Diesel.Program\\nodejs\\node.exe" "D:\\Diesel.Program\\nvm\\v10.17.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\a_git_working\smartcampus_pc\office\node_modules\fsevents
gyp ERR! node -v v10.17.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.