简体   繁体   English

运行“npm i”时遇到节点版本问题

[英]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.

相关问题 我在使用节点js在Debian中运行js脚本时遇到问题 - I'm having trouble running a js script in debian with node js 安装节点版本高于当前系统节点版本的 NPM 包时,如何抛出“在包中找到较低的节点版本”错误? - How to throw "Lower Node Version Found in Package" error when installing NPM package having node version higher than current system node version? 无法运行magento - Having trouble running magento 我无法理解这个 useEffect 是如何通过 fetch 运行的 - I'm having trouble understanding how this useEffect is running with a fetch 我无法让节点 js 中的快速路由器工作 - I'm having trouble getting the express router in node js to work 我在 Node.js 处理发布请求时遇到问题 - I'm having trouble with Node.js handling post requests npm ERR! 生成ionic serve命令时失败(询问检查安装的node.js和npm版本) - npm ERR! Failed when make ionic serve command (ask for checking version of node.js and npm installed) 我遇到了 npm 问题,当我运行“npm install”时我不明白 - I am having npm issues I do not understand when I run `npm install` 运行gulp时发生TypeError。 但是找不到任何TypeError是否存在Node和npm的任何版本问题? - TypeError while running gulp. But can not find any TypeError is there any version issue of Node and npm? 在节点上运行npm-scripts - Running npm-scripts on node
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM