npm安装node-sass时报错,这是为什么?
“gyp verb check python checking for Python executable "python2" in the PATH npm ERR! gyp verb `which` failed Error: not found: python2”
“Cannot read properties of null (reading 'fsTop')”
“While resolving: sass-loader@8.0.2 npm ERR! Found: node-sass@7.0.1 npm ERR! node_modules/node-sass npm ERR! node-sass@"^7.0.1" from the root project”
“Conflicting peer dependency: webpack@5.66.0 npm ERR! node_modules/webpack npm ERR! peer webpack@"^5.0.0" from sass-loader@12.4.0 npm ERR! node_modules/sass-loader npm ERR! dev sass-loader@"*" from the root proj”
“While resolving: vue@0.1.0 npm ERR! Found: webpack@4.46.0 npm ERR! node_modules/webpack”
“Error: spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT”
“Unsupported platform for n@8.0.2: wanted {"os":"!win32"} (current: {"os":"win32","arch":"x64"})”
“'2017' │ gyp ERR! configure error │ gyp ERR! stack Error: `gyp` failed with exit code: 1”
“Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)”
运行这个试试
npm install --global --production windows-build-tools