在Google Cloud App Engine中安装开发依赖关系
我正在尝试将我的React应用部署到Google Cloud App引擎。 我也添加了一个app.yaml
文件。 它看起来像这样:
// app.yaml runtime: nodejs env: flex
现在,我想在部署之前使用webpack构build我的项目。 所以下面的文档 ,我已经添加了prestart
脚本到package.json
。 现在我的脚本部分package.json看起来像这样:
"scripts": { "build": "npm-run-all --parallel webpack-client-build webpack-server-build", "webpack-server-build": "NODE_ENV='development' webpack --config ./webpack/webpack.server.config.js --progress --colors --watch", "webpack-client-build": "NODE_ENV='development' webpack --config ./webpack/webpack.browser.config.js --progress --colors --watch", "build-prod": "npm-run-all webpack-client-build-prod webpack-server-build-prod", "webpack-server-build-prod": "webpack --config ./webpack/webpack.server.config.js -p", "webpack-client-build-prod": "webpack --config ./webpack/webpack.browser.config.js -p", "prestart": "npm run build-prod", "start": "pm2 start dist/main.js" },
我使用npm-run-all
来构build服务器端和客户端的pacakges。 但正因为如此,我的构build失败了,如它所说的文档
Note: Webpack must be listed in the dependencies of the package.json file, as by default devDependencies are not installed when the app is deployed to Google App Engine.
如何安装节点开发依赖项以在Google云中部署Node应用程序?
谢谢 :)
- 可能:Sailsjs与NoSQL和SQL?
- Google Cloud上的虚拟Ubuntu VM无法通过nodejs,external ip连接
- 如何将socket.io部署到Google App Engine?
- 如何使用gcloud-node获取Google Cloud Storage文件的URL?
- 在Google App Engine上禁用Node JS的默认域https:// .appspot.com
- 使用Google Compute Engine加载nodejs上的testing瓶颈
- App引擎nodejs部署错误
- 修改示例Hello World Node.js代码在Google Compute Engine中不起作用
- Node.js Google云端平台数据存储date比较