talesluna-zz / rastrojs-api

API de rastreamento de objetos nos Correios - NodeJS
MIT License
44 stars 6 forks source link

Erro quando npm start #4

Closed flourigh closed 4 years ago

flourigh commented 5 years ago

Boa noite, quando eu faço o npm start depois de build e também dev, este erro acontece e nada acontece, eu faço npm run dev ou yarn dev e funciona assim como o npm test mas quando prod ou start não passa deste erro, poderia ajudar? queria colocar me um heroku, estou estudando a tecnologia e seu app é excelente

`

rastrojs@2.6.0 start /home/rmonteiro/Documentos/Workspace/heroku/RastroJS export NODE_ENV='production' && node dist/app.js

module.js:549 throw err; ^

Error: Cannot find module '/home/rmonteiro/Documentos/Workspace/heroku/RastroJS/dist/app.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3

npm ERR! Linux 4.15.0-39-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! rastrojs@2.6.0 start: export NODE_ENV='production' && node dist/app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the rastrojs@2.6.0 start script 'export NODE_ENV='production' && node dist/app.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the rastrojs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! export NODE_ENV='production' && node dist/app.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs rastrojs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls rastrojs npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/rmonteiro/Documentos/Workspace/heroku/RastroJS/npm-debug.log`

isso está no .log

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using npm@3.5.2 3 info using node@v8.10.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle rastrojs@2.6.0~prestart: rastrojs@2.6.0 6 silly lifecycle rastrojs@2.6.0~prestart: no script for prestart, continuing 7 info lifecycle rastrojs@2.6.0~start: rastrojs@2.6.0 8 verbose lifecycle rastrojs@2.6.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle rastrojs@2.6.0~start: PATH: /usr/share/npm/bin/node-gyp-bin:/home/rmonteiro/Documentos/Workspace/heroku/RastroJS/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 10 verbose lifecycle rastrojs@2.6.0~start: CWD: /home/rmonteiro/Documentos/Workspace/heroku/RastroJS 11 silly lifecycle rastrojs@2.6.0~start: Args: [ '-c', 'export NODE_ENV=\'production\' && node dist/app.js' ] 12 silly lifecycle rastrojs@2.6.0~start: Returned: code: 1 signal: null 13 info lifecycle rastrojs@2.6.0~start: Failed to exec start script 14 verbose stack Error: rastrojs@2.6.0 start:export NODE_ENV='production' && node dist/app.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16) 14 verbose stack at emitTwo (events.js:126:13) 14 verbose stack at EventEmitter.emit (events.js:214:7) 14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14) 14 verbose stack at emitTwo (events.js:126:13) 14 verbose stack at ChildProcess.emit (events.js:214:7) 14 verbose stack at maybeClose (internal/child_process.js:925:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 15 verbose pkgid rastrojs@2.6.0 16 verbose cwd /home/rmonteiro/Documentos/Workspace/heroku/RastroJS 17 error Linux 4.15.0-39-generic 18 error argv "/usr/bin/node" "/usr/bin/npm" "start" 19 error node v8.10.0 20 error npm v3.5.2 21 error code ELIFECYCLE 22 error rastrojs@2.6.0 start:export NODE_ENV='production' && node dist/app.js 22 error Exit status 1 23 error Failed at the rastrojs@2.6.0 start script 'export NODE_ENV='production' && node dist/app.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the rastrojs package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error export NODE_ENV='production' && node dist/app.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs rastrojs 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls rastrojs 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

talesluna-zz commented 5 years ago

@flourigh Estou analisando este problema para melhorar o deploy

marlonrochaa commented 5 years ago

5 fiz a correção nesse PR

DouglasWilli commented 5 years ago

Estou com mesmo problema do @flourigh, tentei resolver com os pull request e ainda continua o mesmo erro.