简体   繁体   English

为什么 npm 安装在我的设备上不起作用,即使我重新安装也无法查看版本详细信息?

[英]Why is it that npm install doesn't work on my device and I am unable to view the version details even though I've reinstalled?

I'm completely new to using Node and am honestly very confused about how this all works.我对使用 Node 完全陌生,老实说,我对这一切是如何工作的感到非常困惑。 I have installed node and NPM but every time I try to check the version to see if it's installed, it tells me "command not found".我已经安装了节点和 NPM 但每次我尝试检查版本以查看它是否已安装时,它都会告诉我“找不到命令”。 I've been at this for almost 2 hours just deleting all the npm/node files and reinstalling but nothing seems to give.我已经在这里待了将近 2 个小时,只是删除了所有 npm/node 文件并重新安装,但似乎没有任何效果。 Can someone please explain if there is anything I can do to fix this issue?有人可以解释一下我可以做些什么来解决这个问题吗?

-bash: npm: command not found

If I go inside the NPM file through the terminal, it shows me this when I try to run npm install or npm start.如果我通过终端在 NPM 文件中使用 go ,当我尝试运行 npm 安装或 ZBB30E85411B545DCF842 启动时,它会向我显示这一点

> npm start
npm should be run outside of the Node.js REPL, in your normal shell.
(Press Ctrl+D to exit.)

Add npm to your path (environment variable on windows not sur on linux) if you are using a portable version, if you are using an installed version of node, it should add npm to your path automatically on windows, not sure on linux, npm start will run the start script from your project package.json file. Add npm to your path (environment variable on windows not sur on linux) if you are using a portable version, if you are using an installed version of node, it should add npm to your path automatically on windows, not sure on linux, npm start 将从您的项目 package.json 文件运行启动脚本。 try going into your npm executable folder (generally in node installation folder), n do a./npm i -g npm尝试进入您的 npm 可执行文件夹(通常在节点安装文件夹中),n 执行 a./npm i -g npm

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 即使我已经卸载了Homebrew的节点版本,npm仍然会将软件包安装到'/ usr / local / Cellar / node / ...' - npm still installing packages to '/usr/local/Cellar/node/…' even though I've uninstalled Homebrew's version of node 当我指出更高版本的NodeJS时,为什么“npm install”没有失败? - Why is “npm install” not failing when I've indicated a higher version of NodeJS? 为什么我无法安装npm的特定版本,以及如何安装? - why I can't install specific version of npm and how to do it? 我使用nvm安装了最新的node.js版本,但是当我尝试更新npm时,它不起作用 - I used nvm to install the latest node.js version, but when I tried to update npm, it doesn't work 即使我运行 npm install airtable 也找不到模块空气表 - Can't find module airtable even though I ran npm install airtable 即使我以root身份运行,在npm安装过程中权限也被拒绝 - Permission denied during npm install even though I run it as root 为什么即使我已经降级了版本,我也无法更改 Typescript 版本 - why I can't change Typescript version even though I have downgraded the version 我无法使用 npm 安装 bcrypt。 我可以下载除 bcrypt 之外的所有其他 package。 为什么会这样? - I am unable to install bcrypt using npm install. I am able to download every other package except bcrypt . Why is it so? 由于版本不可用,npm安装无法正常工作 - npm install doesn't work due to unavailable version 当我使用 NVM 安装新的 Node 版本时不安装 NPM - Doesn't install NPM when I install a new Node version using NVM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM