Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘

created at 08-27-2021 views: 104

Problem description

Start the front-end project of the company's front-end engineer, and prompt the following error message:


Module build failed: Error: ENOENT: no such file or directory, scandir '*********\node_modules\node-sass\vendor'

 @ ./node_modules/vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader??ref--8-oneOf-1-1!./node_modules/_vue-loader@15.9.8@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/modules/docSearch/components/searchTable/searchResult.vue?vue&type=style&index=0&id=d0be5df2&lang=scss&scoped=true& 4:14-537 15:3-20:5 16:22-545
 @ ./src/modules/docSearch/components/searchTable/searchResult.vue?vue&type=style&index=0&id=d0be5df2&lang=scss&scoped=true&
 @ ./src/modules/docSearch/components/searchTable/searchResult.vue
 @ ./src/modules/docSearch/index.js
 @ ./src/router.js
 @ ./src/main.js
 @ multi ./node_modules/_webpack-dev-server@3.11.2@webpack-dev-server/client?http://192.168.1.74:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Solution:

npm rebuild node-sass
created at:08-27-2021
edited at: 08-27-2021: