gyp ERR! find VS
gyp ERR! find VS msvs_version notsetfrom command line or npm config
gyp ERR! find VS VCINSTALLDIR notset,not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017or newer,try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS -not found
gyp ERR! find VS not looking for VS2013 asitisonly supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR!stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\util.js:54:7
gyp ERR! stack at D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-gyp@7.1.2@node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (node:child_process:420:5)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "E:\\nodejs\\node.exe""D:\\研究生阶段学习\\其他\\规划\\谷粒商城\\renren-fast-vue-master\\node_modules\\_node-gyp@7.1.2@node-gyp\\bin\\node-gyp.js""rebuild""--verbose""--libsass_ext=""--libsass_cflags=""--libsass_ldflags=""--libsass_library="
gyp ERR!cwd D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-sass@6.0.1@node-sass
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR!not ok
解决方案
cnpm config set msvs_version 2022
step2
cnpm run dev
报错
ERROR Failed to compile with 6 errors 01:03:23
error in./src/assets/scss/index.scss
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (108)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v6.0.1at module.exports (D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-sass@6.0.1@node-sass\lib\binding.js:13:13)
at Object.<anonymous>(D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_node-sass@6.0.1@node-sass\lib\index.js:13:35)at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)at Module.load (node:internal/modules/cjs/loader:1037:32)at Module._load (node:internal/modules/cjs/loader:878:12)at Module.require (node:internal/modules/cjs/loader:1061:19)at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous>(D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_sass-loader@6.0.6@sass-loader\lib\loader.js:3:14)at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)at Module.load (node:internal/modules/cjs/loader:1037:32)at Module._load (node:internal/modules/cjs/loader:878:12)at Module.require (node:internal/modules/cjs/loader:1061:19)at require (node:internal/modules/cjs/helpers:103:18)at loadLoader (D:\研究生阶段学习\其他\规划\谷粒商城\renren-fast-vue-master\node_modules\_loader-runner@2.4.0@loader-runner\lib\loadLoader.js:18:17)
解决方案
原因是sass版本太低
1.进入node_modules目录,将node-sass文件夹删除
2.执行
cnpm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/