npm安装时出现的一些问题

npm安装时出现的一些问题

问题1:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.34.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.34.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Y\AppData\Roaming\npm-cache\_logs\2018-01-27T10_39_44_245Z-debug.log

这是npm安装的时候,被墙了,可以用下面从国内镜像上来下载

npm install chromedriver –chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver


问题2:

Module build failed: Error: ENOENT: no such file or directory, scandir 'E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\vendor'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.getInstalledBinaries (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\lib\extensions.js:128:13)
    at foundBinariesList (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\lib\errors.js:20:15)
    at foundBinaries (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\lib\errors.js:15:5)
    at Object.module.exports.missingBinary (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\lib\errors.js:45:5)
    at module.exports (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\lib\binding.js:15:30)
    at Object. (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object. (E:\work\CoreUI-Vue-master\Vue_Starter\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
 @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"minimize":false,"sourceMap":false,"alias":{"../img":"../static/img"}}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-04c2046b","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=1!./src/App.vue 4:14-421 13:3-17:5 14:22-429
 @ ./src/App.vue
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

这个是node-sass没有编译,可以用下面命令来重新编译一下

node rebuild node-sass

你可能感兴趣的:(NodeJS,npm)