2

I simply can't run "npm" or, for instance, "gulp" in my cmder. But I can run it if I manually open the cmd

λ gulp
'gulp' is not recognized as an internal or external command,
operable program or batch file.

If I run npm manually from the Nodejs directory, it works. So I added an alias with alias npm=C:\Progra~1\nodejs\npm.cmd $* and now npm works, but I guess that's not the best solution, since I can't run Node modules.

What I've tried

  • I've tried to add "%APPDATA%\npm\node_modules" and "AppData\Roaming\npm" to both System and User environment variables

  • Restarting the computer

  • Running cmd as admin inside of Cmder

  • Add "%APPDATA%\npm\node_modules" and "AppData\Roaming\npm" to "Cmder's user-startup.cmd" path.

I can run Ruby's gem or Python inside of cmder just fine, but Node just won't work specifically inside of Cmder (but will work on window's native cmd.exe)

4

4 回答 4

0

对我来说,有效的是使用来自选择的cmdersave file而不是open with Windows Explorer (default)

在此处输入图像描述

于 2020-09-21T20:25:54.767 回答
0

固定的

通过 github repo https://github.com/cmderdev/下载最新版本的 Cmder,而不是从网站下载。

于 2016-07-23T04:04:29.237 回答
0

以管理员身份运行cmder..

解决方法(在同一目录中移动文件)有效的原因是因为运行 cmder 没有访问其目录外文件的权限。所以要么给它 orivelages 要么以管理员身份运行。它扩展了它可以访问的路径并消除了限制/限制。

问题解决了

于 2018-10-07T10:31:46.573 回答
0

使用“系统属性”窗口将“C:\Progra~1\nodejs\”添加到 Windows 中的用户路径。重启 Cmder。然后cmder可以看到所有与nodejs相关的可执行文件,包括npm。

该网站的标准版本将起作用。

资料来源:这对我有用。

于 2018-02-09T11:07:06.900 回答