vladotesanovic / angular2-express-slim

Quickstart Angular 2 app on Express
MIT License
47 stars 25 forks source link

Error Deploying. Node Version? #3

Closed deckard86 closed 8 years ago

deckard86 commented 8 years ago

Hi,

I forked and published in heroku and I got this error:

-----> Node.js app detected -----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error NPM_CONFIG_PRODUCTION=true NODE_ENV=production NODE_MODULES_CACHE=true -----> Installing binaries engines.node (package.json): unspecified engines.npm (package.json): unspecified (use default)
Resolving node version (latest stable) via semver.io... Downloading and installing node 5.8.0... Using default npm version: 3.7.3 -----> Restoring cache Skipping cache restore (new runtime signature) -----> Building dependencies Pruning any extraneous modules Installing node modules (package.json)

angular2-express-slim@0.0.0 postinstall /tmp/build_6619cd61696aad452aff1308273a9b6f/deckard86-angular2-express-slim-0c728da typings install && tsc
sh: 1: typings: not found
npm ERR! Linux 3.13.0-79-generic npm ERR! argv "/tmp/build_6619cd61696aad452aff1308273a9b6f/deckard86-angular2-express-slim-0c728da/.heroku/node/bin/node" "/tmp/build_6619cd61696aad452aff1308273a9b6f/deckard86-angular2-express-slim-0c728da/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_6619cd61696aad452aff1308273a9b6f/deckard86-angular2-express-slim-0c728da/.npmrc" npm ERR! node v5.8.0 npm ERR! npm v3.7.3 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! angular2-express-slim@0.0.0 postinstall: typings install && tsc npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the angular2-express-slim@0.0.0 postinstall script 'typings install && tsc'. 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 angular2-express-slim package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! typings install && tsc npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular2-express-slim npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls angular2-express-slim npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /tmp/build_6619cd61696aad452aff1308273a9b6f/deckard86-angular2-express-slim-0c728da/npm-debug.log -----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:

How can I solve this? Thanks

vladotesanovic commented 8 years ago

No, it is not problem in Node version. dev-dependencies are problem.

I fixed it on master branch, can you update your repository with latest changes?

deckard86 commented 8 years ago

Great! Thanks very much! :)

michaelb-01 commented 8 years ago

I am having the same problem, what was the solution?

vladotesanovic commented 8 years ago

@michaelb-01 When you cloned this repo?

zzbennett commented 8 years ago

@michaelb-01 I had the same issue and resolved it by adding typings to the dependencies itself, not just devDependencies.

chen86860 commented 8 years ago

@zzbennett Thank you a lot

jockjocko commented 7 years ago

NPM_CONFIG_PRODUCTION needs to be set to false for Heroku to install devDependencies

ibarrajo commented 7 years ago

I just ran into this recently.

I added a new gulp task


gulp.task('installTypings', function() {
  let gulpTypings = require('gulp-typings');
  return gulp.src('./typings.json')
    .pipe(gulpTypings());
});

and changed my postinstall in package.json to

"postinstall": "gulp installTypings"