当我运行npm install
时,会创建一个node_modules
文件夹,但不会安装任何模块。无论项目文件夹位于何处,都会发生这种情况。我从命令的详细运行中看不到任何有用的输出。我引用了this question和this 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"
},
答案 0 :(得分:0)
您需要在包含npm install
的文件夹中运行package.json
。