2016-07-31 20 views
1

My MEAN App organisiert ist:Node.js MEAN Stapel App lokal arbeiten, kann aber nicht einsetzen, um Heroku

MyApp 
    >client 
    >app 
    >node_modules 
    >public 
    >views 
    >bower.json 
    >Gruntfile.js 
    >package.json 
    >server 
    >config 
    >models 
    >node_modules 
    >routes 
    >app.js 
    >package.json 

Alles funktioniert gut app.js vor Ort dient. Ich konnte jedoch nicht erfolgreich auf Heroku bereitstellen. Ich habe etwas Verwirrung bezüglich package.json und vermute, dass dies die Wurzel meines Problems sein könnte. Ich habe zwei package.json Dateien ... ein in-Client, der wie folgt aussieht:

{ 
    "name": "******", 
    "version": "1.0.0", 
    "description": "******", 
    "main": "Gruntfile.js", 
    "directories": { 
    "test": "tests" 
    }, 
    "dependencies": { 
    "grunt": "^0.4.5" 
    }, 
    "devDependencies": { 
    "grunt-contrib-concat": "^0.5.1", 
    "grunt-contrib-watch": "^0.6.1" 
    }, 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
    } 
} 

Und ein package.json in> server:

{ 
    "name": "**********", 
    "version": "1.0.0", 
    "description": "*********", 
    "main": "app.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
    }, 
    "author": "*******", 
    "license": "ISC", 
    "dependencies": { 
    "bcrypt": "^0.8.5", 
    "body-parser": "^1.13.2", 
    "connect-flash": "^0.1.1", 
    "cookie-parser": "^1.3.5", 
    "ejs": "^2.3.3", 
    "express": "^4.13.1", 
    "express-session": "^1.11.3", 
    "mongoose": "^4.1.0", 
    "mongoskin": "^1.3.20", 
    "morgan": "^1.6.1", 
    "passport": "^0.2.2", 
    "passport-local": "^1.0.0" 
    } 
} 

ich die Heroku git initialisiert habe in der MyApp-Ordner und gedrückt. Der Build ist erfolgreich, aber das Öffnen der App funktioniert nicht. Die Protokolle werfen viele npm ERR! S

Ich habe versucht, eine neue package.json in den Ordner MyApp ohne Erfolg zu schreiben. Ich bin mir nicht sicher, ob das notwendig:

{ 
    "name": "*******", 
    "version": "1.0.0", 
    "description": "*********", 
    "main": "server/app.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
    }, 
    "author": "********", 
    "license": "ISC" 
} 

Protokolle:

± |master ✓| → git push heroku master 
Counting objects: 13, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (12/12), done. 
Writing objects: 100% (13/13), 1.46 KiB | 0 bytes/s, done. 
Total 13 (delta 6), 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:  NPM_CONFIG_PRODUCTION=true 
remote:  NODE_ENV=production 
remote:  NODE_MODULES_CACHE=true 
remote: 
remote: -----> Installing binaries 
remote:  engines.node (package.json): unspecified 
remote:  engines.npm (package.json): unspecified (use default) 
remote:   
remote:  Resolving node version (latest stable) via semver.io... 
remote:  Downloading and installing node 5.11.1... 
remote:  Using default npm version: 3.8.6 
remote: 
remote: -----> Restoring cache 
remote:  Loading 2 from cacheDirectories (default): 
remote:  - node_modules 
remote:  - bower_components (not cached - skipping) 
remote: 
remote: -----> Building dependencies 
remote:  Installing node modules (package.json) 
remote: 
remote: -----> Caching build 
remote:  Clearing previous node cache 
remote:  Saving 2 cacheDirectories (default): 
remote:  - node_modules 
remote:  - bower_components (nothing to cache) 
remote: 
remote: -----> Build succeeded! 
remote:  └── (empty) 
remote:   
remote: !  This app may not specify any way to start a node process 
remote:  https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type 
remote: 
remote: -----> Discovering process types 
remote:  Procfile declares types  -> (none) 
remote:  Default types for buildpack -> web 
remote: 
remote: -----> Compressing... 
remote:  Done: 18.4M 
remote: -----> Launching... 
remote:  Released v13 
remote:  https://*********.herokuapp.com/ deployed to Heroku 
remote: 
remote: Verifying deploy... done. 
To https://git.heroku.com/*********.git 
    ********* master -> master 

2016-07-30 23:31:51 ☆ *********-iMac in /Volumes/*********/Developer/********* 
± |master ✓| → heroku logs 
2016-07-31T05:25:47.224161+00:00 app[web.1]: npm ERR! not with npm itself. 
2016-07-31T05:25:47.224484+00:00 app[web.1]: npm ERR!  node server/app.js 
2016-07-31T05:25:47.224317+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 
2016-07-31T05:25:47.224644+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 
2016-07-31T05:25:47.224804+00:00 app[web.1]: npm ERR!  npm bugs ********* 
2016-07-31T05:25:47.225116+00:00 app[web.1]: npm ERR!  npm owner ls ********* 
2016-07-31T05:25:47.225273+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 
2016-07-31T05:25:47.224960+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 
2016-07-31T05:25:47.228732+00:00 app[web.1]: 
2016-07-31T05:25:47.228987+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 
2016-07-31T05:25:47.229127+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
2016-07-31T05:25:47.327229+00:00 heroku[web.1]: Process exited with status 1 
2016-07-31T05:25:47.366898+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-31T05:41:46.439742+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=*********.herokuapp.com request_id=91de90e2-0bf5-4863-b783-ceecaa8fde8d fwd="172.112.229.171" dyno= connect= service= status=503 bytes= 
2016-07-31T05:48:30.859479+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-31T05:48:32.839176+00:00 heroku[web.1]: Starting process with command `npm start` 
2016-07-31T05:48:35.391181+00:00 app[web.1]: 
2016-07-31T05:48:35.391203+00:00 app[web.1]: > *********@1.0.0 start /app 
2016-07-31T05:48:35.391204+00:00 app[web.1]: > node server/app.js 
2016-07-31T05:48:35.391204+00:00 app[web.1]: 
2016-07-31T05:48:35.959374+00:00 app[web.1]: module.js:341 
2016-07-31T05:48:35.959393+00:00 app[web.1]:  throw err; 
2016-07-31T05:48:35.959395+00:00 app[web.1]: ^
2016-07-31T05:48:35.959395+00:00 app[web.1]: 
2016-07-31T05:48:35.959397+00:00 app[web.1]: Error: Cannot find module './config/config' 
2016-07-31T05:48:35.959398+00:00 app[web.1]:  at Function.Module._resolveFilename (module.js:339:15) 
2016-07-31T05:48:35.959398+00:00 app[web.1]:  at Function.Module._load (module.js:290:25) 
2016-07-31T05:48:35.959399+00:00 app[web.1]:  at Module.require (module.js:367:17) 
2016-07-31T05:48:35.959399+00:00 app[web.1]:  at require (internal/module.js:20:19) 
2016-07-31T05:48:35.959400+00:00 app[web.1]:  at Object.<anonymous> (/app/server/app.js:6:23) 
2016-07-31T05:48:35.959400+00:00 app[web.1]:  at Module._compile (module.js:413:34) 
2016-07-31T05:48:35.959401+00:00 app[web.1]:  at Object.Module._extensions..js (module.js:422:10) 
2016-07-31T05:48:35.959401+00:00 app[web.1]:  at Module.load (module.js:357:32) 
2016-07-31T05:48:35.959402+00:00 app[web.1]:  at Function.Module._load (module.js:314:12) 
2016-07-31T05:48:35.959402+00:00 app[web.1]:  at Function.Module.runMain (module.js:447:10) 
2016-07-31T05:48:35.959403+00:00 app[web.1]:  at startup (node.js:148:18) 
2016-07-31T05:48:35.959409+00:00 app[web.1]:  at node.js:405:3 
2016-07-31T05:48:35.969614+00:00 app[web.1]: 
2016-07-31T05:48:35.977274+00:00 app[web.1]: npm ERR! Linux 3.13.0-91-generic 
2016-07-31T05:48:35.977679+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 
2016-07-31T05:48:35.978481+00:00 app[web.1]: npm ERR! npm v3.8.6 
2016-07-31T05:48:35.977929+00:00 app[web.1]: npm ERR! node v5.11.1 
2016-07-31T05:48:35.979067+00:00 app[web.1]: npm ERR! code ELIFECYCLE 
2016-07-31T05:48:35.979324+00:00 app[web.1]: npm ERR! *********@1.0.0 start: `node server/app.js` 
2016-07-31T05:48:35.979509+00:00 app[web.1]: npm ERR! Exit status 1 
2016-07-31T05:48:35.979695+00:00 app[web.1]: npm ERR! 
2016-07-31T05:48:35.979864+00:00 app[web.1]: npm ERR! Failed at the *********@1.0.0 start script 'node server/app.js'. 
2016-07-31T05:48:35.980260+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the ********* package, 
2016-07-31T05:48:35.980075+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 
2016-07-31T05:48:35.980433+00:00 app[web.1]: npm ERR! not with npm itself. 
2016-07-31T05:48:35.980617+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 
2016-07-31T05:48:35.980796+00:00 app[web.1]: npm ERR!  node server/app.js 
2016-07-31T05:48:35.980959+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 
2016-07-31T05:48:35.981118+00:00 app[web.1]: npm ERR!  npm bugs ********* 
2016-07-31T05:48:35.981270+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 
2016-07-31T05:48:35.981425+00:00 app[web.1]: npm ERR!  npm owner ls ********* 
2016-07-31T05:48:35.981595+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 
2016-07-31T05:48:35.985488+00:00 app[web.1]: 
2016-07-31T05:48:35.985775+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 
2016-07-31T05:48:35.985852+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
2016-07-31T05:48:36.069623+00:00 heroku[web.1]: Process exited with status 1 
2016-07-31T05:48:36.098125+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-31T06:14:31.189397+00:00 heroku[slug-compiler]: Slug compilation started 
2016-07-31T06:30:06.982191+00:00 heroku[slug-compiler]: Slug compilation started 
2016-07-31T06:31:50.317210+00:00 heroku[api]: Deploy 06516f1 by *********@gmail.com 
2016-07-31T06:31:50.317272+00:00 heroku[api]: Release v13 created by *********@gmail.com 
2016-07-31T06:31:50.511812+00:00 heroku[slug-compiler]: Slug compilation started 
2016-07-31T06:31:50.511822+00:00 heroku[slug-compiler]: Slug compilation finished 
2016-07-31T06:31:50.692916+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-31T06:31:52.514294+00:00 heroku[web.1]: Starting process with command `npm start` 
2016-07-31T06:31:54.849264+00:00 app[web.1]: npm ERR! Linux 3.13.0-91-generic 
2016-07-31T06:31:54.850042+00:00 app[web.1]: npm ERR! node v5.11.1 
2016-07-31T06:31:54.849823+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 
2016-07-31T06:31:54.850399+00:00 app[web.1]: npm ERR! npm v3.8.6 
2016-07-31T06:31:54.851691+00:00 app[web.1]: 
2016-07-31T06:31:54.852581+00:00 app[web.1]: npm ERR! missing script: start 
2016-07-31T06:31:54.852716+00:00 app[web.1]: npm ERR! 
2016-07-31T06:31:54.852805+00:00 app[web.1]: npm ERR! If you need help, you may report this error at: 
2016-07-31T06:31:54.852909+00:00 app[web.1]: npm ERR!  <https://github.com/npm/npm/issues> 
2016-07-31T06:31:54.860771+00:00 app[web.1]: 
2016-07-31T06:31:54.860966+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 
2016-07-31T06:31:54.861099+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
2016-07-31T06:31:54.917805+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-31T06:31:54.918636+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-31T06:31:54.941001+00:00 heroku[web.1]: Process exited with status 1 
2016-07-31T06:31:56.382143+00:00 heroku[web.1]: Starting process with command `npm start` 
2016-07-31T06:31:58.484779+00:00 app[web.1]: npm ERR! Linux 3.13.0-91-generic 
2016-07-31T06:31:58.485394+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 
2016-07-31T06:31:58.485718+00:00 app[web.1]: npm ERR! node v5.11.1 
2016-07-31T06:31:58.486234+00:00 app[web.1]: npm ERR! npm v3.8.6 
2016-07-31T06:31:58.488049+00:00 app[web.1]: 
2016-07-31T06:31:58.489425+00:00 app[web.1]: npm ERR! missing script: start 
2016-07-31T06:31:58.489756+00:00 app[web.1]: npm ERR! If you need help, you may report this error at: 
2016-07-31T06:31:58.489606+00:00 app[web.1]: npm ERR! 
2016-07-31T06:31:58.498880+00:00 app[web.1]: 
2016-07-31T06:31:58.489907+00:00 app[web.1]: npm ERR!  <https://github.com/npm/npm/issues> 
2016-07-31T06:31:58.499107+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 
2016-07-31T06:31:58.499260+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
2016-07-31T06:31:58.598275+00:00 heroku[web.1]: Process exited with status 1 
2016-07-31T06:31:58.605133+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-31T06:32:40.380168+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=*********.herokuapp.com request_id=********* fwd="*********" dyno= connect= service= status=503 bytes= 

ich das .config Problem gelöst haben, aber die App funktioniert immer noch nicht auf Heroku. Ich habe hinzugefügt "Start" auf meine package.json:

{ 
    "name": "**********", 
    "version": "1.0.0", 
    "description": "*********", 
    "main": "server/app.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1", 
    "start": "node server/app.js" 
    }, 
    "author": "********", 
    "license": "ISC" 
} 

Ich habe versucht, "Start" mit den beiden "Node-Server/app.js" und einfach "Knoten app.js."

Die Protokolle jetzt:

2016-07-31T20:30:57.827511+00:00 heroku[slug-compiler]: Slug compilation started 
2016-07-31T20:30:57.827516+00:00 heroku[slug-compiler]: Slug compilation finished 
2016-07-31T20:30:57.825021+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-31T20:30:59.273318+00:00 heroku[web.1]: Starting process with command `npm start` 
2016-07-31T20:31:01.202950+00:00 app[web.1]: 
2016-07-31T20:31:01.202968+00:00 app[web.1]: > *********@1.0.0 start /app 
2016-07-31T20:31:01.202969+00:00 app[web.1]: > node app.js 
2016-07-31T20:31:01.202970+00:00 app[web.1]: 
2016-07-31T20:31:01.256865+00:00 app[web.1]: module.js:341 
2016-07-31T20:31:01.256867+00:00 app[web.1]:  throw err; 
2016-07-31T20:31:01.256867+00:00 app[web.1]: ^
2016-07-31T20:31:01.256868+00:00 app[web.1]: 
2016-07-31T20:31:01.256869+00:00 app[web.1]: Error: Cannot find module '/app/app.js' 
2016-07-31T20:31:01.256869+00:00 app[web.1]:  at Function.Module._resolveFilename (module.js:339:15) 
2016-07-31T20:31:01.256870+00:00 app[web.1]:  at Function.Module.runMain (module.js:447:10) 
2016-07-31T20:31:01.256871+00:00 app[web.1]:  at startup (node.js:148:18) 
2016-07-31T20:31:01.256870+00:00 app[web.1]:  at Function.Module._load (module.js:290:25) 
2016-07-31T20:31:01.256871+00:00 app[web.1]:  at node.js:405:3 
2016-07-31T20:31:01.262989+00:00 app[web.1]: 
2016-07-31T20:31:01.269797+00:00 app[web.1]: npm ERR! Linux 3.13.0-91-generic 
2016-07-31T20:31:01.270174+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 
2016-07-31T20:31:01.270404+00:00 app[web.1]: npm ERR! node v5.11.1 
2016-07-31T20:31:01.270985+00:00 app[web.1]: npm ERR! npm v3.8.6 
2016-07-31T20:31:01.271447+00:00 app[web.1]: npm ERR! code ELIFECYCLE 
2016-07-31T20:31:01.271618+00:00 app[web.1]: npm ERR! *********@1.0.0 start: `node app.js` 
2016-07-31T20:31:01.271772+00:00 app[web.1]: npm ERR! Exit status 1 
2016-07-31T20:31:01.271940+00:00 app[web.1]: npm ERR! 
2016-07-31T20:31:01.272096+00:00 app[web.1]: npm ERR! Failed at the *********@1.0.0 start script 'node app.js'. 
2016-07-31T20:31:01.272260+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 
2016-07-31T20:31:01.272573+00:00 app[web.1]: npm ERR! not with npm itself. 
2016-07-31T20:31:01.272417+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the ********* package, 
2016-07-31T20:31:01.272723+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 
2016-07-31T20:31:01.272885+00:00 app[web.1]: npm ERR!  node app.js 
2016-07-31T20:31:01.273189+00:00 app[web.1]: npm ERR!  npm bugs ********* 
2016-07-31T20:31:01.273037+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 
2016-07-31T20:31:01.273340+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 
2016-07-31T20:31:01.273493+00:00 app[web.1]: npm ERR!  npm owner ls ********* 
2016-07-31T20:31:01.277062+00:00 app[web.1]: 
2016-07-31T20:31:01.277274+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 
2016-07-31T20:31:01.273651+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 
2016-07-31T20:31:01.277415+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
2016-07-31T20:31:01.346939+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-31T20:31:01.331495+00:00 heroku[web.1]: Process exited with status 1 
2016-07-31T20:31:12.076774+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=*********.herokuapp.com request_id=2a1195*********ece8bb2c fwd="172.1*********71" dyno= connect= service= status=503 bytes= 
2016-07-31T20:34:47.098473+00:00 heroku[api]: Deploy 388b5ab by *********@gmail.com 
2016-07-31T20:34:47.098521+00:00 heroku[api]: Release v16 created by *********@gmail.com 
2016-07-31T20:34:47.266271+00:00 heroku[slug-compiler]: Slug compilation started 
2016-07-31T20:34:47.266277+00:00 heroku[slug-compiler]: Slug compilation finished 
2016-07-31T20:34:47.319491+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-31T20:34:48.929096+00:00 heroku[web.1]: Starting process with command `npm start` 
2016-07-31T20:34:50.867157+00:00 app[web.1]: 
2016-07-31T20:34:50.867172+00:00 app[web.1]: > *********@1.0.0 start /app 
2016-07-31T20:34:50.867172+00:00 app[web.1]: > node server/app.js 
2016-07-31T20:34:50.867173+00:00 app[web.1]: 
2016-07-31T20:34:51.278936+00:00 app[web.1]: /app/server/node_modules/bcrypt/node_modules/bindings/bindings.js:83 
2016-07-31T20:34:51.278950+00:00 app[web.1]:   throw e 
2016-07-31T20:34:51.278951+00:00 app[web.1]:  ^
2016-07-31T20:34:51.278953+00:00 app[web.1]: Error: /app/server/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header 
2016-07-31T20:34:51.278952+00:00 app[web.1]: 
2016-07-31T20:34:51.278953+00:00 app[web.1]:  at Error (native) 
2016-07-31T20:34:51.278955+00:00 app[web.1]:  at Module.load (module.js:357:32) 
2016-07-31T20:34:51.278957+00:00 app[web.1]:  at require (internal/module.js:20:19) 
2016-07-31T20:34:51.278954+00:00 app[web.1]:  at Object.Module._extensions..node (module.js:440:18) 
2016-07-31T20:34:51.278956+00:00 app[web.1]:  at Function.Module._load (module.js:314:12) 
2016-07-31T20:34:51.278957+00:00 app[web.1]:  at Module.require (module.js:367:17) 
2016-07-31T20:34:51.278959+00:00 app[web.1]:  at Object.Module._extensions..js (module.js:422:10) 
2016-07-31T20:34:51.278958+00:00 app[web.1]:  at bindings (/app/server/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44) 
2016-07-31T20:34:51.278958+00:00 app[web.1]:  at Object.<anonymous> (/app/server/node_modules/bcrypt/bcrypt.js:3:35) 
2016-07-31T20:34:51.278959+00:00 app[web.1]:  at Module._compile (module.js:413:34) 
2016-07-31T20:34:51.278960+00:00 app[web.1]:  at Module.load (module.js:357:32) 
2016-07-31T20:34:51.278961+00:00 app[web.1]:  at Module.require (module.js:367:17) 
2016-07-31T20:34:51.278963+00:00 app[web.1]:  at Module._compile (module.js:413:34) 
2016-07-31T20:34:51.278961+00:00 app[web.1]:  at Function.Module._load (module.js:314:12) 
2016-07-31T20:34:51.278962+00:00 app[web.1]:  at require (internal/module.js:20:19) 
2016-07-31T20:34:51.278963+00:00 app[web.1]:  at Object.<anonymous> (/app/server/models/user.js:3:23) 
2016-07-31T20:34:51.294193+00:00 app[web.1]: npm ERR! node v5.11.1 
2016-07-31T20:34:51.286768+00:00 app[web.1]: 
2016-07-31T20:34:51.294540+00:00 app[web.1]: npm ERR! npm v3.8.6 
2016-07-31T20:34:51.293678+00:00 app[web.1]: npm ERR! Linux 3.13.0-91-generic 
2016-07-31T20:34:51.293977+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 
2016-07-31T20:34:51.295092+00:00 app[web.1]: npm ERR! *********@1.0.0 start: `node server/app.js` 
2016-07-31T20:34:51.294922+00:00 app[web.1]: npm ERR! code ELIFECYCLE 
2016-07-31T20:34:51.295255+00:00 app[web.1]: npm ERR! Exit status 1 
2016-07-31T20:34:51.295593+00:00 app[web.1]: npm ERR! Failed at the *********@1.0.0 start script 'node server/app.js'. 
2016-07-31T20:34:51.295436+00:00 app[web.1]: npm ERR! 
2016-07-31T20:34:51.295738+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 
2016-07-31T20:34:51.295847+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the ********* package, 
2016-07-31T20:34:51.296198+00:00 app[web.1]: npm ERR!  node server/app.js 
2016-07-31T20:34:51.296081+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 
2016-07-31T20:34:51.295954+00:00 app[web.1]: npm ERR! not with npm itself. 
2016-07-31T20:34:51.296412+00:00 app[web.1]: npm ERR!  npm bugs ********* 
2016-07-31T20:34:51.296304+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 
2016-07-31T20:34:51.296517+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 
2016-07-31T20:34:51.296625+00:00 app[web.1]: npm ERR!  npm owner ls ********* 
2016-07-31T20:34:51.296730+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 
2016-07-31T20:34:51.300465+00:00 app[web.1]: 
2016-07-31T20:34:51.300731+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
2016-07-31T20:34:51.300635+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 
2016-07-31T20:34:51.385297+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-31T20:34:51.373820+00:00 heroku[web.1]: Process exited with status 1 
2016-07-31T20:35:00.298699+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=*********.herokuapp.com request_id=a09912*********-f3aee9e3a05a fwd="*********" dyno= connect= service= status=503 bytes= 

"npm Start" Running arbeitet lokal, wenn meine package.json ist:

{ 
    "name": "*********", 
    "version": "1.0.0", 
    "description": "*********", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1", 
    "start": "cd server && node app.js" 
    }, 
    "author": "*********", 
    "license": "ISC" 
} 

Diese noch nicht, wann funktioniert jedoch im Einsatz.

+0

Benötigen Sie die ERRs sehen Sie erwähnen - nicht genug Informationen – 7zark7

+0

Verwenden Sie Typoskript und Ihre transpiled JS-Dateien eingesetzt werden? –

Antwort

0

Ich sehe zwei Fehler:

Erste,

kein Problem mit npm, aber mit Ihrem Code:

Error: Cannot find module './config/config' 

Also ich denke, in Ihrem app.js tun Sie require('./config/config') das ist nicht vorhanden (.gitignore?)

Sekunde,

npm ERR! missing script: start

sollten Sie eine Startaktion in Ihnen Paket angeben:

"scripts": { 
    "start": "node app.js" 
    }, 
+0

.config/config behoben, danke. Ich habe versucht, "start" in mein package.json zu integrieren, ohne Erfolg. Details und neue Protokolle wurden dem ursprünglichen Beitrag hinzugefügt. – dt801ts

+0

Gibt es einen Konflikt zwischen "Haupt" und "Start" in package.json? Ich muss nur Server/app.js initialisieren – dt801ts