在我安装brew节点和NVM安装v0.6.19之后,我的节点版本总是v0.6.1-pre.
我的节点版本是:
node -v
v0.6.1-pre
Run Code Online (Sandbox Code Playgroud)
NVM说这个(在我第一次在一个bash终端中安装一个版本的节点之后):
nvm ls
v0.6.19
current: v0.6.19
Run Code Online (Sandbox Code Playgroud)
但是当我重新启动bash时,这就是我所看到的:
nvm ls
v0.6.19
current: v0.6.1-pre
default -> 0.6.19 (-> v0.6.19)
Run Code Online (Sandbox Code Playgroud)
那么这个幻像节点0.6.1-pre版本在哪里?我该如何摆脱它?我正在尝试通过NPM安装库,以便我可以处理项目.
我尝试使用BREW在NVM之前更新,使用"brew update"和"brew install node".我已经尝试删除/ usr/local/include中的"node"目录以及"/ usr/local/lib"中的"node"和"node_modules".我已经尝试卸载npm并按照这些说明重新安装它.
所有这一切都是因为我试图更新旧版本的节点以安装"zipstream"库.现在我的用户目录中有文件夹,并且节点版本STILL不是最新的,即使NVM说它使用的是0.6.19.
理想情况下,我想卸载nodejs,npm和nvm,然后在我的系统上从头开始重新安装整个东西.
我想将我的节点版本从最新版本降级到V6.10.3 ..
但迄今为止没有任何工作.尝试NVM,并且通过说找不到make命令也会出错.如何降级Node?
我正在尝试在一个项目中安装 node-sass,该项目在我的电脑上完美构建和运行,但在我的表面上,我在尝试安装软件包时遇到了重大问题。
注意:我已经多次尝试重新安装和重建项目。
错误总结:
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Max-T\Documents\Sources\StaffMangerV2\black-dashboard-pro-react-v1.0.0\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Max-T\\Documents\\Sources\\StaffMangerV2\\black-dashboard-pro-react-v1.0.0\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Max-T\Documents\Sources\StaffMangerV2\black-dashboard-pro-react-v1.0.0\node_modules\node-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: …Run Code Online (Sandbox Code Playgroud) 这是我卸载后的package.json sass node-sass,sass-loader因为我将节点版本从14更改为16,
{
"name": "our-awesome-project",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"static": "NUXTJS_DEPLOY_TARGET=static NUXTJS_SSR=true nuxt generate",
"build-and-start": "NUXTJS_DEPLOY_TARGET=server NUXTJS_SSR=false nuxt build && NUXTJS_DEPLOY_TARGET=server NUXTJS_SSR=false nuxt start"
},
"husky": {
"hooks": {
"pre-commit": "cross-env PRE_COMMIT=true lint-staged -r"
}
},
"dependencies": {
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"nuxt-i18n": "^6.28.1",
"nuxt-purgecss": "^1.0.0",
"vue": "^2.6.14",
"vue-server-renderer": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^8.0.0",
"@nuxtjs/google-fonts": "^1.3.0",
"@nuxtjs/storybook": "^4.2.0", …Run Code Online (Sandbox Code Playgroud) node.js ×4
node-sass ×2
npm ×2
javascript ×1
npm-install ×1
nuxt.js ×1
reactjs ×1
sass ×1
webpack ×1