npm install 报错:no such file or directory, scandir '..\node-sass\vendor'

Vue 项目 npm install 报错:module build failed: Error: ENOENT: no such file or directory, scandir ‘…\node-sass\vendor’

  1. Today, in his gitee above a previously downloaded the demo vue write their own file, run the command after download: npm install such a long time found stopped, looked at the command line, like chromedriver where stuck, turned himself the article [build] Vue.js , press ctrl + c to pause the program npm install command, and then enter the npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedrivercommand to run a bit, and then execute npm installthe command, then no error.

  2. The next step is to run npm devto run the project, the results reported the following error

module build failed: Error: ENOENT: no such file or directory, scandir 'C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\vendor'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.getInstalledBinaries (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\lib\extensions.js:130:13)
    at foundBinariesList (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\lib\errors.js:20:15)
    at foundBinaries (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\lib\errors.js:15:5)
    at Object.module.exports.missingBinary (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\lib\errors.js:45:5)
    at module.exports (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\lib\binding.js:15:30)
    at Object.<anonymous> (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.sassLoader (C:\MySoft\ideaWorkSpace\vue-demo\vue-demo\node_modules\sass-loader\lib\loader.js:46:72)

 @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-d848e354","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/pages/system/right_list.vue 4:14-402 13:3-17:5 14:22-410
 @ ./src/components/pages/system/right_list.vue
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8088 webpack/hot/dev-server ./src/main.js
  1. Surf the Internet at the statistics, you need to enter in the command window npm rebuild node-sassto re-build, and then execute npm devto run.

Reference address

npm install error chromedriver record

npm: no such file or directory, scandir '…/node_modules/node-sass/vendor报错

Guess you like

Origin blog.csdn.net/cai454692590/article/details/89599588