I've deployed my node web app to heroku. Its built but failed to start. Here's the first few lines of output:
2018-03-05T20:17:51.058817+00:00 heroku[web.1]: - Starting process with command `npm start`
2018-03-05T20:17:52.868249+00:00 app[web.1]: - npm ERR! missing script: start
2018-03-05T20:17:52.874771+00:00 app[web.1]: -
2018-03-05T20:17:52.874973+00:00 app[web.1]: - npm ERR! A complete log of this run can be found in:
2018-03-05T20:17:52.875068+00:00 app[web.1]: - npm ERR! /app/.npm/_logs/2018-03-05T20_17_52_869Z-debug.log
The error log goes on, but I'm trying to located the log location:
/app/.npm/_logs/2018-03-05T20_17_52_869Z-debug.log
How do I get to this?
Related
Having a few deployment issue here...
As my nodejs app in github is not in the root directory (its in a graphql dir), I added a top level .buildpacks file with the following content:
graphql=https://github.com/heroku/heroku-buildpack-nodejs.git
After I tried a build there was no sign of any dynos in my app so I added a top level Procfile with contents:
web: npm start
When I deployed again, now there does seem to be a dyno (it says 'This app is using free dynos' in the overview section), however the app is still goosed :
2022-07-06T11:44:06.316635+00:00 app[api]: Deploy 79e3037a by user x#gmail.com
2022-07-06T11:44:23.060054+00:00 heroku[web.1]: Starting process with command `npm start`
2022-07-06T11:44:25.159819+00:00 app[web.1]: npm ERR! code ENOENT
2022-07-06T11:44:25.160057+00:00 app[web.1]: npm ERR! syscall open
2022-07-06T11:44:25.160249+00:00 app[web.1]: npm ERR! path /app/package.json
2022-07-06T11:44:25.160789+00:00 app[web.1]: npm ERR! errno -2
2022-07-06T11:44:25.161801+00:00 app[web.1]: npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
2022-07-06T11:44:25.161850+00:00 app[web.1]: npm ERR! enoent This is related to npm not being able to find a file.
2022-07-06T11:44:25.161892+00:00 app[web.1]: npm ERR! enoent
2022-07-06T11:44:25.163062+00:00 app[web.1]:
2022-07-06T11:44:25.163202+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-07-06T11:44:25.163233+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-07-06T11_44_25_124Z-debug-0.log
2022-07-06T11:44:25.378220+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-06T11:44:25.299092+00:00 heroku[web.1]: Process exited with status 254
what am I missing?
Usually I used the similar .gitlab-ci.yml code to send reports to coveralls for some of my repos:
install_dependencies:
stage: build
script:
- npm install -g gulp nyc
- npm install coveralls
- npm install
artifacts:
paths:
- node_modules/
testing:
stage: test
script:
- npx nyc gulp test
- npx nyc report --reporter=html
- npx nyc report --reporter=text-lcov | npx ./node_modules/coveralls/bin/coveralls.js
artifacts:
paths:
- public
- coverage
- .nyc_output
And on Appveyor:
install:
- ps: Install-Product node $env:nodejs_version
- npm install -g gulp nyc coveralls
- npm install
test_script:
- node --version
- npm --version
- gulp --version
- cmd: npx nyc gulp test
after_test:
cmd: npx nyc report --reporter=text-lcov | npx coverall
It worked well few months ago, but today I found that it doesn't work anymore for all my repos, I got the error:
npm ERR! code ENOTDIR
npm ERR! syscall open
npm ERR! path /builds/username/proj/node_modules/coveralls/bin/coveralls.js/package.json
npm ERR! errno -20
npm ERR! ENOTDIR: not a directory, open '/builds/username/proj/node_modules/coveralls/bin/coveralls.js/package.json'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-11-06T03_01_59_736Z-debug.log
node:events:304
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:162:15)
at writeGeneric (node:internal/stream_base_commons:153:3)
at Socket._writeGeneric (node:net:763:11)
at Socket._write (node:net:775:8)
at writeOrBuffer (node:internal/streams/writable:388:12)
at Socket.Writable.write (node:internal/streams/writable:333:10)
at ConsoleWriter.write (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-lib-report/lib/file-writer.js:80:28)
at ConsoleWriter.println (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-lib-report/lib/file-writer.js:35:14)
at TextLcov.onDetail (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-reports/lib/lcovonly/index.js:31:16)
at Visitor.value (/root/.npm/_npx/6e14a84d153b8cb9/node_modules/istanbul-lib-report/lib/tree.js:38:38)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:80:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
npm ERR! code 1
npm ERR! path /builds/username/proj
npm ERR! command failed
npm ERR! command sh -c nyc report '--reporter=text-lcov'
When I've installed coveralls module globally and changed the command to … | npx coveralls:
npm WARN exec The following package was not found and will be installed: coveralls
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
/root/.npm/_npx/4d97078606416726/node_modules/coveralls/bin/coveralls.js:19
throw err;
^
Bad response: 500 {"message":"Build processing error.","error":true,"url":""}
(Use `node --trace-uncaught ...` to show where the exception was thrown)
npm ERR! code 1
npm ERR! path /builds/username/proj
npm ERR! command failed
npm ERR! command sh -c coveralls
The same, but shorter, on Appveyor for now:
C:\Users\appveyor\AppData\Roaming\npm\node_modules\coveralls\bin\coveralls.js:19
throw err;
^
Bad response: 500 {"message":"Build processing error.","error":true,"url":""}
Command exited with code 1
I can't understand, is it temporary problem of Coveralls, or Istanbul/NYC, or some changes took the place permanently, and the code should be changed accordingly in some way.
I've deployed my bot's files but in the logs it says
2020-07-08T18:00:47.754261+00:00 app[web.1]: npm ERR! missing script: start
2020-07-08T18:00:47.762967+00:00 app[web.1]:
2020-07-08T18:00:47.763212+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-07-08T18:00:47.763312+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-07-08T18_00_47_755Z-debug.log
Heroku uses the start script, if no Procfile exists.
Useful links:
Procfile
Heroku Docs
npm docs
My application does not run in production. This is the code I am getting when reviewing the log.
2020-04-21T05:15:21.000000+00:00 app[api]: Build succeeded
2020-04-21T05:15:29.986534+00:00 app[web.1]:
2020-04-21T05:15:29.986552+00:00 app[web.1]: > webzm#0.1.0 start /app
2020-04-21T05:15:29.986553+00:00 app[web.1]: > node server.js
2020-04-21T05:15:29.986553+00:00 app[web.1]:
2020-04-21T05:15:32.860504+00:00 app[web.1]: [2020-04-21T05:15:32.860Z] error self signed certificate
2020-04-21T05:15:32.863444+00:00 app[web.1]: Error: self signed certificate
2020-04-21T05:15:32.863445+00:00 app[web.1]: at TLSSocket.onConnectSecure (_tls_wrap.js:1492:34)
2020-04-21T05:15:32.863446+00:00 app[web.1]: at TLSSocket.emit (events.js:315:20)
2020-04-21T05:15:32.863446+00:00 app[web.1]: at TLSSocket._finishInit (_tls_wrap.js:935:8)
2020-04-21T05:15:32.863446+00:00 app[web.1]: at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:693:12) {
2020-04-21T05:15:32.863447+00:00 app[web.1]: code: 'DEPTH_ZERO_SELF_SIGNED_CERT'
2020-04-21T05:15:32.863448+00:00 app[web.1]: }
2020-04-21T05:15:32.876901+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-04-21T05:15:32.877229+00:00 app[web.1]: npm ERR! errno 1
2020-04-21T05:15:32.878225+00:00 app[web.1]: npm ERR! webzm#0.1.0 start: `node server.js`
2020-04-21T05:15:32.878324+00:00 app[web.1]: npm ERR! Exit status 1
2020-04-21T05:15:32.878522+00:00 app[web.1]: npm ERR!
2020-04-21T05:15:32.878652+00:00 app[web.1]: npm ERR! Failed at the webzm#0.1.0 start script.
2020-04-21T05:15:32.878778+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Please see the following issue: https://github.com/strapi/strapi/issues/5696
An upstream package changed the way they validate self-signed certs that cause a failure.
im trying to push a mean stack project to heroku, but it wont start on heroku's server. it keeps giving me the following from the applications log:
2017-12-12T23:59:32.528690+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-12T23:59:32.529607+00:00 app[web.1]: npm ERR! atl#0.0.0 start:
`ng serve`
2017-12-12T23:59:32.529706+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-12T23:59:32.529925+00:00 app[web.1]: npm ERR!
2017-12-12T23:59:32.530127+00:00 app[web.1]: npm ERR! Failed at the
atl#0.0.0 start script.
2017-12-12T23:59:32.530306+00:00 app[web.1]: npm ERR! This is probably
not a problem with npm. There is likely additional logging output
above.
2017-12-12T23:59:32.535107+00:00 app[web.1]:
2017-12-12T23:59:32.535281+00:00 app[web.1]: npm ERR! A complete log
of this run can be found in:
2017-12-12T23:59:32.535429+00:00 app[web.1]: npm ERR!
/app/.npm/_logs/2017-12-12T23_59_32_531Z-debug.log
2017-12-12T23:59:32.626726+00:00 heroku[web.1]: State changed from
starting to crashed
2017-12-12T23:59:32.613442+00:00 heroku[web.1]: Process exited with
status 1
i don''t know where to look for this problem, please let me know if i need to upload any files to help with this error, thank you in advance.