linnovate / meanio

meanio core module
MIT License
54 stars 73 forks source link

New meanio postinstall script causes failed deployments to Heroku #51

Open jonslucas opened 9 years ago

jonslucas commented 9 years ago

The commit on 27/4/15 removed the mean-cli dependency which is used in the main packages.json postinstall :

"scripts": {
    "start": "node server",
    "mocha": "node node_modules/.bin/mocha packages/**/server/tests/**/*.js -R spec -r tools/test/mocha-req.js",
    "karma": "node node_modules/karma/bin/karma start karma.conf.js",
    "test": "npm run mocha && NODE_ENV=test npm run start & sleep 20 && npm run karma",
    "postinstall": "node node_modules/meanio/node_modules/mean-cli/bin/mean-postinstall"
 },

If you call, for instance, ls node_modules/meanio/node_modules, you will see this:

remote:        complex-list
remote:        dependable-list
remote:        glob
remote:        lazy-dependable
remote:        mean-health
remote:        q
remote:        request
remote:        shelljs
remote:        uglify-js

Ultimately, when deploying with meanio 0.7.5, you will see this:

       > <YOUR APP NAME>@x.x.x postinstall /<tmp file location for deploy>
       > node node_modules/meanio/node_modules/mean-cli/bin/mean-postinstall

       module.js:340
           throw err;
                 ^
       Error: Cannot find module '/<tmp file location for deploy>/node_modules/meanio/node_modules/mean-cli/bin/mean-postinstall'
           at Function.Module._resolveFilename (module.js:338:15)
           at Function.Module._load (module.js:280:25)
           at Function.Module.runMain (module.js:497:10)
           at startup (node.js:119:16)
           at node.js:935:3

This makes sense, since the dependency to it was removed. However, the only way I could get my deploy to successfully complete was to change the meanio dependency from "meanio" : "linnovate/meanio to "meanio" : "0.7.4"

in the root package.json file.