今天换电脑启动老项目,发现一直启动不了。报如下的错误,其实很简单,问题出在了
NodeJs
上。我安装的Node
版本是最新的,也就是v16.xxx
,这就是问题所在。只要把Node
版本换成低版本的就行了。我自己换的是V14.16.0
。
1. 先卸载自己电脑上的Node
自行百度怎么卸载。
2. 挑选适合自己的Node
版本。
3. 下载安装文件
64位下载箭头指的.msi
文件就好了。
4. 安装
安装就直接点下一步就好了。
附上报错信息
> node-sass@3.13.1 install E:web_hwfVue02app
ode_modules
ode-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass@3.13.1 postinstall E:web_hwfVue02app
ode_modules
ode-sass
> node scripts/build.js
Building: E:26_nodejs
ode.exe E:web_hwfVue02app
ode_modules
ode-gypin
ode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'E:\26_nodejs
ode.exe’,
gyp verb cli ‘E:\web_hwf\Vue\02app
ode_modules
ode-gyp\bin
ode-gyp.js’,
gyp verb cli ‘rebuild’,
gyp verb cli ‘–verbose’,
gyp verb cli ‘–libsass_ext=’,
gyp verb cli ‘–libsass_cflags=’,
gyp verb cli ‘–libsass_ldflags=’,
gyp verb cli ‘–libsass_library=’ ]
gyp info using node-gyp@3.6.2