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

全能人才

系统挂了,重装后,项目跑不起来了,vue版本为2.6.11,只记得@vue/cli是4.x,具体不记得了,nodejs版本也不记得了,反正跑起来报错,搜了一下也没搜到。 目前环境: ![](https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241117/2d728de9231248b315ff22adafaaf7c7.png) 错误信息如下: 0 info it worked if it ends with ok 1 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.12 3 info using node@v10.24.1 4 verbose run-script [ 'preserve', 'serve', 'postserve' ] 5 info lifecycle client2@0.1.0~preserve: client2@0.1.0 6 info lifecycle client2@0.1.0~serve: client2@0.1.0 7 verbose lifecycle client2@0.1.0~serve: unsafe-perm in lifecycle true 8 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\npm 9 verbose lifecycle client2@0.1.0~serve: CWD: F:\codes_git\JytPlatformWebClient3\jytplatformwebclient\src\client2 10 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: null 12 info lifecycle client2@0.1.0~serve: Failed to exec serve script 13 verbose stack Error: client2@0.1.0 serve: `vue-cli-service serve` 13 verbose stack Exit status 134 13 verbose stack at EventEmitter. (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. (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.0 15 verbose cwd F:\codes_git\JytPlatformWebClient3\jytplatformwebclient\src\client2 16 verbose Windows_NT 10.0.19043 17 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.1 19 verbose npm v6.14.12 20 error code ELIFECYCLE 21 error errno 134 22 error client2@0.1.0 serve: `vue-cli-service serve` 22 error Exit status 134 23 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 ]

阅读量:17

点赞量:0

问AI
直接 github 搜索就行:"https://github.com/search?q=vue%402.6.11&type=repositories" (https://link.segmentfault.com/?enc=%2FWlek1hvUdvzCWhZntouFQ%3D%3D.MKX9oD09SJyBsXqtf1kE6jefVHgdUc19QB%2BIpmPqQmsrJwVzB5W1fTLVnFJ8WD8Npa34qEHjPOyJnNmhTYj%2B3Q%3D%3D) ,这个技巧 GET 了没 "image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241117/3c24d9c92690e9a0f1f39a41b35cd745.png) node版本更好查了,直接在 vue 的官方仓库中找到对应 tag: "https://github.com/vuejs/vue/blob/v2.6.11/package.json" (https://link.segmentfault.com/?enc=hC2zphO8M8SLtClBc68crg%3D%3D.UZMGbarNGC2fDh94oaUgk0EGcCt3icBeqoyW7reIlQrC2bE4ldOzBivqZ0JgqSSOC3ECUg4uTHccJyyR5qdL6g%3D%3D) , 会找到 ""@types/node": "^12.12.0""