在终端输入npm run dev:h5的时候编译,就会报错
gyp ERR! configure error
gyp ERR! stack Error: 404 response downloading https://r.cnpmjs.org/node/v11.0.0/node-v11.0.0-headers.tar.gz
gyp ERR! stack at Request.
gyp ERR! stack at Request.emit (events.js:187:15)
gyp ERR! stack at Request.onRequestResponse (/Users/aiewing/Desktop/Taro/myApp/node_modules/request/request.js:1066:10)
gyp ERR! stack at ClientRequest.emit (events.js:182:13)
gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:562:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:449:20)
gyp ERR! stack at TLSSocket.emit (events.js:182:13)
gyp ERR! stack at addChunk (_stream_readable.js:283:12)
gyp ERR! stack at readableAddChunk (_stream_readable.js:264:11)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/bin/node" "/Users/aiewing/Desktop/Taro/myApp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/aiewing/Desktop/Taro/myApp/node_modules/node-sass
gyp ERR! node -v v11.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
系统信息
看日志应该是依赖没有装好,可以重新安装试下
应该是 node-sass 没装上, 换成淘宝源试下. 项目根目录放个 .npmrc 文件.
# NPM Taobao registry
registry=https://registry.npm.taobao.org
# Taobao node binary mirrors
fse_binary_host_mirror=https://npm.taobao.org/mirrors/fsevents
sass_binary_site=http://cdn.npm.taobao.org/dist/node-sass
Hello~
您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。
如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。
Good luck and happy coding~
Most helpful comment
应该是
node-sass没装上, 换成淘宝源试下. 项目根目录放个.npmrc文件.