vue2.6.11配套的nodejs、@vue/cli 分别对应什么版本?

作者站长头像
站长
· 阅读数 10

系统挂了,重装后,项目跑不起来了,vue版本为2.6.11,只记得@vue/cli是4.x,具体不记得了,nodejs版本也不记得了,反正跑起来报错,搜了一下也没搜到。

目前环境:vue2.6.11配套的nodejs、@vue/cli 分别对应什么版本?

错误信息如下:0 info it worked if it ends with ok1 verbose cli [ 'D:\Program Files\nodejs\node.exe',1 verbose cli 'D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',1 verbose cli 'run',1 verbose cli 'serve' ]2 info using npm@6.14.123 info using node@v10.24.14 verbose run-script [ 'preserve', 'serve', 'postserve' ]5 info lifecycle client2@0.1.0~preserve: client2@0.1.06 info lifecycle client2@0.1.0~serve: client2@0.1.07 verbose lifecycle client2@0.1.0~serve: unsafe-perm in lifecycle true8 verbose lifecycle client2@0.1.0~serve: PATH: D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;F:\codes_git\JytPlatformWebClient3\jytplatformwebclient\src\client2\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\Program Files\Git\cmd;D:\Program Files\nodejs\;C:\Users\qingyun\AppData\Local\Microsoft\WindowsApps;;D:\Users\qingyun\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\qingyun\AppData\Roaming\npm9 verbose lifecycle client2@0.1.0~serve: CWD: F:\codes_git\JytPlatformWebClient3\jytplatformwebclient\src\client210 silly lifecycle client2@0.1.0~serve: Args: [ '/d /s /c', 'vue-cli-service serve' ]11 silly lifecycle client2@0.1.0~serve: Returned: code: 134 signal: null12 info lifecycle client2@0.1.0~serve: Failed to exec serve script13 verbose stack Error: client2@0.1.0 serve: vue-cli-service serve13 verbose stack Exit status 13413 verbose stack at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)13 verbose stack at EventEmitter.emit (events.js:198:13)13 verbose stack at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)13 verbose stack at ChildProcess.emit (events.js:198:13)13 verbose stack at maybeClose (internal/child_process.js:982:16)13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)14 verbose pkgid client2@0.1.015 verbose cwd F:\codes_git\JytPlatformWebClient3\jytplatformwebclient\src\client216 verbose Windows_NT 10.0.1904317 verbose argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "serve"18 verbose node v10.24.119 verbose npm v6.14.1220 error code ELIFECYCLE21 error errno 13422 error client2@0.1.0 serve: vue-cli-service serve22 error Exit status 13423 error Failed at the client2@0.1.0 serve script.23 error This is probably not a problem with npm. There is likely additional logging output above.24 verbose exit [ 134, true ]

回复
1个回答
avatar
test
2024-06-24

直接 github 搜索就行:https://github.com/search?q=vue%402.6.11&type=repositories ,这个技巧 GET 了没

answer image

node版本更好查了,直接在 vue 的官方仓库中找到对应 tag: https://github.com/vuejs/vue/blob/v2.6.11/package.json , 会找到 "@types/node": "^12.12.0"

回复
likes
适合作为回答的
  • 经过验证的有效解决办法
  • 自己的经验指引,对解决问题有帮助
  • 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
  • 询问内容细节或回复楼层
  • 与题目无关的内容
  • “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容