npm install express 报错:no such file or directory

Upgrading... \Error: npm
Error: WARN ENOENT ENOENT: no such file or directory, open 'C:\Program Files\nodejs\package.json'

Error: npm
Error: WARN EPACKAGEJSON nodejs No description

Error: npm
Error: WARN EPACKAGEJSON nodejs No repository field.

Error: npm WARN EPACKAGEJSON nodejs No README data

Error: npm
Error: WARN EPACKAGEJSON nodejs No license field.

解决:

 1.edit your Windows installation's PATH to put %appdata%\npm before%ProgramFiles%\nodejs. Remember that you'll need to restart cmd.exe (and potentially restart Windows) when you make changes to PATH or how npm is installed.

2.cd 到D:\nodejs\node_modules\npm 安装目录,然后npm install express

你可能感兴趣的:(npm install express 报错:no such file or directory)