我正在尝试在heroku上托管我的adonis JS项目。
我关注了https://medium.com/@mazinosukah/how-to-deploy-adonisjs-apps-to-heroku-66741e7cd26f和https://scotch.io/tutorials/deploying-adonisjs-apps-to-heroku,但遇到了这些站点中未描述的错误。 (该Webapp在本地运行良好)
运行git push heroku herokuMaster:master
我得到:
Counting objects: 1, done.
Writing objects: 100% (1/1), 198 bytes | 99.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 10.13.0
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 10.13.0...
remote: Downloading and installing node 10.13.0...
remote: Using default npm version: 6.4.1
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote: added 510 packages from 288 contributors and audited 4026 packages in 15.432s
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Caching build
remote: - node_modules
remote:
remote: -----> Pruning devDependencies
remote: audited 4026 packages in 3.961s
remote: found 0 vulnerabilities
remote:
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> release, web
remote:
remote: -----> Compressing...
remote: Done: 24.4M
remote: -----> Launching...
remote: ! Release command declared: this new release will not be available until the command succeeds.
remote: Released v9
remote: https://myappname.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
remote: Running release command...
remote:
remote:
remote: TypeError: Cannot read property 'name' of undefined
remote:
remote:
remote: 1 _.transform
remote: /app/node_modules/@adonisjs/ace/src/Command/index.js:527
remote:
remote: 2 anonymous
remote: /app/node_modules/lodash/lodash.js:13807
remote:
remote: 3 arrayEach
remote: /app/node_modules/lodash/lodash.js:516
remote:
remote: 4 Function.transform
remote: /app/node_modules/lodash/lodash.js:13806
remote:
remote: 5 Function.commanderAction
remote: /app/node_modules/@adonisjs/ace/src/Command/index.js:526
remote:
remote: 6 Command.listener
remote: /app/node_modules/commander/index.js:315
remote:
remote: 7 Command.parseArgs
remote: /app/node_modules/commander/index.js:654
remote:
remote: 8 Command.parse
remote: /app/node_modules/commander/index.js:474
remote:
remote: 9 Kernel.invoke
remote: /app/node_modules/@adonisjs/ace/src/Kernel/index.js:329
remote:
remote: 10 Ignitor._invokeAce
remote: /app/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:532
remote:
remote: 11 Ignitor.fireAce
remote: /app/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:847
remote:
remote: Waiting for release.... failed.
我不确定为什么它抱怨node_modules中的文件...
有任何想法吗?如有必要,我可以共享更多代码。
答案 0 :(得分:2)
我从
更改了Procfile的内容 ArrayList<String> results = DBOpenHelper.checkLinkIntegrity();
for (String s : results) {
Log.i("RESULTS",s);
}
到
release: ENV_SILENT=true node ace migration:run — force
web: ENV_SILENT=true npm start
答案 1 :(得分:0)
问题是带有强制标志的错字。我将Procfile更新为以下内容,并且有效:
release: ENV_SILENT=true node ace migration:run --force
web: ENV_SILENT=true npm start