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を使って追加の設定が欠けていますか?
'--only = production'オプションを' npm install'と一緒に使ってみてください。 – ishmaelMakitla
'--only = production'を使うと' dev-dependencies'ではなく 'dependencies'だけがインストールされます。理想的には 'dependencies'をすべてインストールする必要があり、' dev-dependencies'は 'npm install'とは異なりますか? – Bhushan
'npm install'コマンドがすべてのインストールをインストールしていないことをどのように知っていますか?私は 'npm install'はdevDepenciesと依存関係を持つべきだと思う –