错误:npm应该在常规外壳中的节点repl外部运行 [英] Error: npm should be run outside of the node repl, in your normal shell

查看:80
本文介绍了错误:npm应该在常规外壳中的节点repl外部运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读有关如何安装启动我的项目所需的一切的教程.一切正常,直到进入cmd,创建了"PATH"并添加了所有内容,我有了node.js,但是下一步是通过cmd进入npm install cordova.尽管当我尝试发生这种情况时:

所以我没有先访问节点就尝试了它,然后又发生了:

我做错了可能很简单.但是,我们将不胜感激.

解决方案

不要在REPL中运行npm install xxx-REPL用于测试Node.js代码,而不是运行可执行文件(嗯,npm)./p>

就像第二次尝试运行 一样运行它.可以在此处找到.

I'm going through a tutorial of how to install everything I need to start a project of mine. Everything's going well until I'm in the cmd, I've created the 'PATH' and added everything, I have node.js, however the next step is to npm install cordova through the cmd. Though when I try this happens:

So I tried it on its own without having accessed node first and then this happened:

It's probably something really simple that I've done wrong. But the help would be very appreciated.

解决方案

Don't run npm install xxx in the REPL - the REPL is meant for testing out Node.js code, not running executables (well, npm).

Just run it like the second time you tried it. The fix to that can be found here.

这篇关于错误:npm应该在常规外壳中的节点repl外部运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆