问题一:npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
解决:使用管理员身份运行
问题二: error in ./src/styles/index.scss
Module build failed: Error: ENOENT: no such file or directory, scandir 'H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\node-sass\vendor'
at Object.fs.readdirSync (fs.js:904:18)
at Object.getInstalledBinaries (H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\node-sass\lib\extensions.js:131:13)
at foundBinariesList (H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\node-sass\lib\binding.js:15:30)
at Object.<anonymous> (H:\Firewall\industrial_firewall\industrial_firewall_front\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 (H:\Firewall\industrial_firewall\industrial_firewall_front\node_modules\sass-loader\lib\loader.js:46:72)
@ ./src/styles/index.scss 4:14-203 13:3-17:5 14:22-211
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
解决方案是执行以下方法:
npm rebuild node-sass
问题三:
Trailing spaces not allowed
Missing space before value for key 'components'
都是Eslint的锅,要不就是少空格,多空格,要不就是多换行,少换行
或者查看加入规则:https://blog.csdn.net/wang0112233/article/details/90608328