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