运行公司的项目 一开始运行出现这种错误
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding E:\xxxx\lab\af-gl\node_modules\node-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 10.x
然后百度了下
发现解决办法 :
1、npm rebuild node-sass
2、npm update
3、npm run dev
但是呢 在npm rebuild node-sass 会出现以下错误
UnicodeEncodeError: 'charmap' codec can't encode characters in position 7016-7019: character maps to <undefined>
百度了下 是python出的问题 然后我运行
cnpm install python
重新安装了下python
然后在运行
cnpm rebuild node-sass
提示
Testing binary
Binary is fine
运行项目 成功!