0
我们试图通过执行资源在厨师配方中使用'npm install'来解决节点依赖性问题。没有通过厨师安装的Npm依赖关系
这是我的厨师食谱:
execute "download dependancies from package.json" do
command "npm install --silent"
user "#{node['non_root_user']}"
end
这是我的包JSON:
"dependencies": {
"classnames": "^2.2.5",
"keymirror": "^0.1.1",
"moment": "^2.10.2",
"moment-timezone": "^0.4.0",
"node-sass": "^3.2.0",
"parse": "^1.4.2",
"react": "^0.13.2",
"react-swipeable": "^3.0.2"
},
"devDependencies": {
"babel-eslint": "^4.0.10",
"brfs": "^1.4.0",
"browser-sync": "^2.6.7",
"browserify": "^9.0.7",
"browserify-shim": "^3.8.5",
"classnames": "^2.2.5",
"dotenv": "^1.2.0",
"eslint": "^1.1.0",
"eslint-plugin-react": "^3.2.3",
npm install
只安装dev-dependencies
但不dependencies
。有没有使用npm install
来安装所有依赖项的自动化方法?我是否错过了npm的其他配置。
尝试在'npm install'中使用'--only = production'选项。 – ishmaelMakitla
如果我使用'--only = production',它只会安装'dependencies'而不是'dev-dependencies'是否正确? Ideailly应该安装所有'dependencies'和'dev-dependencies'是不是'npm install'? – Bhushan
你怎么知道'npm install'命令没有安装所有的依赖关系?我认为'npm install'应该安装devDepencies和依赖关系 –