npm install 项目报错
来源:3-2 工程构建安装

Astrogladiator
2019-06-21
本机环境 System Windows_NT 10.0.17134
imooc-jd-finance\node_modules\node-sass\build\binding.vcxproj]
d:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\nan\nan_object_wrap.h(124): error C2039: “IsNea
rDeath”: 不是“Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits>”的成员 [D:\public\project\front_end\vue_
project
\imooc-jd-finance\node_modules\node-sass\build\binding.vcxproj]
d:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\nan\nan_object_wrap.h(24): error C2039: “IsNear
Death”: 不是“Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits>”的成员 [D:\public\project\front_end\vue_p
roject
imooc-jd-finance\node_modules\node-sass\build\binding.vcxproj]
d:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\nan\nan_object_wrap.h(124): error C2039: “IsNea
rDeath”: 不是“Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits>”的成员 [D:\public\project\front_end\vue_
project
\imooc-jd-finance\node_modules\node-sass\build\binding.vcxproj]
109 个警告
30 个错误
已用时间 00:00:47.81
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command “D:\server\web\nodejs\node.exe” “D:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” "–libsass_library="
gyp ERR! cwd D:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\node-sass
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
1回答
-
Astrogladiator
提问者
2019-06-21
更新node-sass到
"node-sass": "4.12.0",
就可以运行了,但是还有些其他的警告
gyp info ok
Installed to D:\public\project\front_end\vue_project\imooc-jd-finance\node_modules\node-sass\vendor\win32-x64-72\binding.node
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 986 packages from 541 contributors and audited 9307 packages in 442.129s
found 5 vulnerabilities (1 moderate, 4 high)
run `npm audit fix` to fix them, or `npm audit` for details
00
相似问题