express不是内部命令

有时用npm install express -g安装完express时,在写express -v会显示express不是内部命令

这样的话如果自己的安装没有问题的话就要考虑到环境变量了

win7

PATH

D: odejs ode_global;C:UsersAdministratorAppDataRoaming pm

系统里

NODE_PATH
D: odejs ode_global ode_modules

Path


%NODE_PATH% ode_modules;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0;C:Program Files (x86)IntelOpenCL SDK2.0inx86;C:Program Files (x86)IntelOpenCL SDK2.0inx64;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesThinkPadBluetooth Software;C:Program FilesThinkPadBluetooth Softwaresyswow64;C:Program FilesTortoiseSVNin;D: odejs

win10

PATH
D: odejs ode_global
%NODE_PATH%

系统里
NODE_PATH
D: odejs ode_global ode_modules

Path

%NODE_PATH% ode_modules
D: odejs

安装完express还需要安装npm install express-generator -g

原文地址:https://www.cnblogs.com/ddnh/p/8086944.html