NPM不安装依赖项

时间:2017-09-18 20:18:23

标签: iis npm windows-10

当我运行npm install时,会创建一个node_modules文件夹,但不会安装任何模块。无论项目文件夹位于何处,都会发生这种情况。我从命令的详细运行中看不到任何有用的输出。我引用了this questionthis question,两者都相似但不适用于此处。我需要做些什么或改变才能在这种环境中成功运行npm install

npm install --verbose的输出:

npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   '--verbose' ]
npm info using npm@3.10.10
npm info using node@v6.11.3
npm info lifecycle undefined~preinstall: undefined
npm verb correctMkdir C:\Users\btm296\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm verb lock using C:\Users\btm296\AppData\Roaming\npm-cache\_locks\staging-7d19d75cf02aa2ec.lock for C:\inetpub\wwwroot\photo\web\themes\custom\byu_photo\node_modules\.staging
npm verb unlock done using C:\Users\btm296\AppData\Roaming\npm-cache\_locks\staging-7d19d75cf02aa2ec.lock for C:\inetpub\wwwroot\photo\web\themes\custom\byu_photo\node_modules\.staging
npm info linkStuff !invalid#1
npm verb linkBins !invalid#1
npm verb linkMans !invalid#1
npm info lifecycle undefined~install: undefined
npm info lifecycle undefined~postinstall: undefined
npm info lifecycle undefined~prepublish: undefined
npm info ok

package.json的dependecies部分:

"dependencies": {
    "bootstrap-sass": "^3.3.7",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^3.1.1",
    "gulp-clean-css": "^3.8.0",
    "gulp-concat": "^2.6.1",
    "gulp-inject": "^4.2.0",
    "gulp-minify": "^1.0.0",
    "gulp-notify": "^2.2.0",
    "gulp-sass": "^3.1.0",
    "gulp-sourcemaps": "^2.6.1",
    "slick-carousel": "^1.6.0"
  },

1 个答案:

答案 0 :(得分:0)

您需要在包含npm install的文件夹中运行package.json