[英]Having trouble with node version when running 'npm i'
I am doing a take-home assessment which requires me to 'npm i' a project into vscode and to code a solution.我正在做一个带回家的评估,这需要我将一个项目“npm i”到 vscode 中并编写一个解决方案。 I have downloaded the repo successfully but I keep getting a very extensive error when I try to run 'npm i'.
我已经成功下载了 repo,但是当我尝试运行“npm i”时,我不断收到一个非常广泛的错误。
The instructions say that I should be using Node.js version 14.x.说明说我应该使用 Node.js 版本 14.x。 I checked what version of node I have installed and I have node v16.13.1.
我检查了我安装的节点版本,我有节点 v16.13.1。 I assume this should be fine?
我想这应该没问题吧? Or do I need to have the older version 14.x in order to install my dependencies succesfully?
或者我是否需要旧版本 14.x 才能成功安装我的依赖项?
I'm a bit new to coding so hopefully this question makes sense.我对编码有点陌生,所以希望这个问题有意义。 Thank you!
谢谢!
Hey so from my experience, it can also cause errors if you have a version which is newer than the expected version.嘿,根据我的经验,如果您的版本比预期版本更新,它也会导致错误。
To keep track of your node versions, which you have installed I can recommend:要跟踪您已安装的节点版本,我可以推荐:
https://github.com/nvm-sh/nvm https://github.com/nvm-sh/nvm
https://github.com/coreybutler/nvm-windows/releases https://github.com/coreybutler/nvm-windows/releases
The first Solution works for linux,mac and wsl, the second is for windows only.第一个解决方案适用于 linux、mac 和 wsl,第二个仅适用于 windows。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.