win7 express js:cmd不能识别'express' [英] win7 express js: 'express' is not recognized in cmd

查看:238
本文介绍了win7 express js:cmd不能识别'express'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows 7计算机上安装并运行了node.js。我运行

I have node.js installed and running fine on windows 7 computer. I run

> npm install -g express
> npm install -g express-generator
> npm install -g express-generator@3

他们都安装成功。但是当我去一个新的文件夹,尝试:

and they all install successfully. But when I go to a new folder and try:

> express myproject

我得到:'express'不被识别为内部或外部命令,可操作的程序或批处理文件

我看到'express','express.cmd'和'node_modules' '和'express-generator'文件夹在C:\Users\ME\AppData\Roaming\\\
pm目录中

I see 'express', 'express.cmd', and 'node_modules' directory with 'express' and 'express-generator' folders in the C:\Users\ME\AppData\Roaming\npm directory

我将npm目录添加到我的

I added the npm directory to my PATH in case that was missed.

我尝试了所有可以找到的解决方案:

I tried all the solutions I could find:

快照不被识别命令(windows)

https://groups.google.com/forum /#!topic / express-js / Cr92_LC_pUk

还有什么可以尝试快速工作?

what else can I try to get express working?

推荐答案

检查在你有路径到快速文件夹的路径。记住,您需要重新打开cmd以将更改应用于环境变量,因为修改它们不会修改当前工作流程AFAIK的变量。如果您正在更改系统环境变量,则可能需要重新启动Windows。

Check that you have the path to the express folder in the path. remember that you need to reopen cmd to apply the changes in the environment variables as modifying them does not modify the variables of the currently working processes, AFAIK. If you are changing system-wide environment variables, you may need to restart Windows.

您还可能需要检查PATHEXT是否包含.CMD扩展名。

You also may need to check if PATHEXT contains .CMD extension.

这篇关于win7 express js:cmd不能识别'express'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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