Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mean-admin deploy to heroku "postinstall", Mean 0.0.4 #13

Open
adle29 opened this issue Aug 19, 2014 · 16 comments
Open

Mean-admin deploy to heroku "postinstall", Mean 0.0.4 #13

adle29 opened this issue Aug 19, 2014 · 16 comments

Comments

@adle29
Copy link

adle29 commented Aug 19, 2014

When I try to deploy my app to heroku I get the following error:

 0761 info [email protected] Failed to exec postinstall script
10762 error [email protected] postinstall: `mean postinstall`
10762 error Exit status 8
10763 error Failed at the [email protected] postinstall script.
10763 error This is most likely a problem with the mean-admin package,
10763 error not with npm itself.
10763 error Tell the author that this fails on your system:
10763 error     mean postinstall
10763 error You can get their info via:
10763 error     npm owner ls mean-admin
10763 error There is likely additional logging output above.
10764 error System Linux 3.8.11-ec2
10765 error command "/tmp/build_f4ca4d87-a101-41a2-9437-c36f366357e7/vendor/node/bin/node"     "/tmp/build_f4ca4d87-a101-41a2-9437-c36f366357e7/vendor/node/bin/npm" "rebuild"
10766 error cwd /tmp/build_f4ca4d87-a101-41a2-9437-c36f366357e7
10767 error node -v v0.10.30
10768 error npm -v 1.4.21
10769 error code ELIFECYCLE
10770 verbose exit [ 1, true ] 

Stats
MEAN Version: 0.4.0
Node Version: v0.10.26
Meanio cli 0.6.4
Mac

Packages:
Mean-admin
Mean-upload

This issue has already been addressed here issue:#501 but not solved completely .

Possible solutions I have tried but have failed:

  1. I already added "mean-admin": "linnovate/mean-admin".
  2. change "mean postinstall" to "bower install"
  3. "heroku config:set NODE_ENV=production" and "git push heroku master"
  4. Change "postinstall": "./node_modules/bower/bin/bower install"
  5. Remove the postinstall script,fails; also mean-upload fails.
  6. heroku repo:purge_cache
  7. Adding .npmignore file.
  8. Added
       {
            "storage": {
               "packages": ".bower/cache",
               "registry": ".bower/registry"
             },
              "tmp": ".bower/tmp"
       }

9...still thinking...

Sites with the solutions that did not work for me:
stackoverflow-Deploy to heroku

Any ideas?

@fmunoz92
Copy link

try with
heroku plugins:install https://github.com/heroku/heroku-repo.git
and
heroku repo:purge_cache

@adle29
Copy link
Author

adle29 commented Aug 20, 2014

Apparently the only way I was able to push to heroku was to remove the mean-admin. It still will not work. Tried the "heroku repo:purge:cache". Did not work.

just more logs:

   sh: mean: not found
   npm ERR! [email protected] postinstall: `mean postinstall`
   npm ERR! Exit status 127
   npm ERR! 
   npm ERR! Failed at the [email protected] postinstall script.
   npm ERR! This is most likely a problem with the mean-admin package,
   npm ERR! not with npm itself.
   npm ERR! Tell the author that this fails on your system:
   npm ERR!     mean postinstall
   npm ERR! You can get their info via:
   npm ERR!     npm owner ls mean-admin
   npm ERR! There is likely additional logging output above.

   npm ERR! System Linux 3.8.11-ec2
   npm ERR! command "/tmp/build_cf55bac8-0f4b-4e29-a702-976d733014b7/vendor/node/bin/node" "/tmp/build_cf55bac8-0f4b-4e29-a702-976d733014b7/vendor/node/bin/npm" "install" "--userconfig" "/tmp/build_cf55bac8-0f4b-4e29-a702-976d733014b7/.npmrc"
   npm ERR! cwd /tmp/build_cf55bac8-0f4b-4e29-a702-976d733014b7
   npm ERR! node -v v0.10.31
   npm ERR! npm -v 1.4.23
   npm ERR! code ELIFECYCLE
   npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.31","npm":"1.4.23"})

@adle29
Copy link
Author

adle29 commented Aug 22, 2014

More debug after trying different things:

     module.js:340
               throw err;
                     ^
           Error: Cannot find module 'lodash'
               at Function.Module._resolveFilename (module.js:338:15)
               at Function.Module._load (module.js:280:25)
               at Module.require (module.js:364:17)
               at require (module.js:380:17)
               at Object.<anonymous> (/tmp/build_1d4726e2-d8ac-4bba-b5b6-5d78cb88c342/node_modules/meanio/bin/mean:7:9)
               at Module._compile (module.js:456:26)
               at Object.Module._extensions..js (module.js:474:10)
               at Module.load (module.js:356:32)
               at Function.Module._load (module.js:312:12)
               at Function.Module.runMain (module.js:497:10)

Different times, different options.

     > [email protected] postinstall /tmp/build_ba36b548-9f18-47ab-b849-f2ab71016867/node_modules/mean-admin
     > mean postinstall

   sh: mean: not found

   npm ERR! [email protected] postinstall: `mean postinstall`
   npm ERR! Exit status 127
   npm ERR! 
   npm ERR! Failed at the [email protected] postinstall script.
   npm ERR! This is most likely a problem with the mean-admin package,
   npm ERR! not with npm itself.
   npm ERR! Tell the author that this fails on your system:
   npm ERR!     mean postinstall
   npm ERR! You can get their info via:
   npm ERR!     npm owner ls mean-admin
   npm ERR! There is likely additional logging output above.
   npm ERR! System Linux 3.8.11-ec2
   npm ERR! command "/tmp/build_ba36b548-9f18-47ab-b849-f2ab71016867/vendor/node/bin/node" "/tmp/build_ba36b548-9f18-47ab-b849-f2ab71016867/vendor/node/bin/npm" "rebuild"
   npm ERR! cwd /tmp/build_ba36b548-9f18-47ab-b849-f2ab71016867
   npm ERR! node -v v0.10.31
   npm ERR! npm -v 1.4.23
   npm ERR! code ELIFECYCLE
   npm ERR! 
   npm ERR! Additional logging details can be found in:
   npm ERR!     /tmp/build_ba36b548-9f18-47ab-b849-f2ab71016867/npm-debug.log
   npm ERR! not ok code 0

@ellman
Copy link
Collaborator

ellman commented Sep 14, 2014

hey all

There is a new post install script that should help out in this area. We are still improving it should be stable enough for some intial deployments.

Add a mean.json file in the root of your app which contains this object {"dependencies":{"mean-admin":"latest"}}

the post install script will install it in packages/contrib for versions of meanio above 0.5.18. The new script is in 0.5.30

There will be a better version in the coming days but for those of you anxious to get mean-admin on heroku feel free to use this verison

@iamlogiq
Copy link

@ellman I tried it but it doesn't work. Below is what I did...please tell me if i'm missing something

  1. I updated meanio ---> sudo npm update meanio
  2. checked the current version --> mean -v = 0.6.7
  3. added mean.json with the object you specified above
  4. deployed to heroku but no mean-admin

Further more...i can't even install mean-admin locally anymore. When I do --> mean install mean-admin locally I get an error. So now not only I can't get it to work on heroku I can't even get it to work locally.

PLEASE help!

@ellman
Copy link
Collaborator

ellman commented Sep 15, 2014

hi @iamlogiq

Please open your package.json from the project and let me know when version of meanio the project is using.

Thanks

@iamlogiq
Copy link

@ellman ok i updated it in package.json ---> "meanio": "^0.5.30"
and it works on heroku but its not working locally. I did npm install and i dont see mean-admin installed. I did mean install mean-admin and it says package not found.
how do i get it to work locally now???

how do i get it to work locally now??

@TylerL-uxai
Copy link
Contributor

Been having the same problem and trouble shooting this all day.

@TylerL-uxai
Copy link
Contributor

Hey, it's working I guess. meanio needs to be version 0.5.34 and "mean-admin": "linnovate/mean-admin" fixes it. Thank god. ::falls into bed from exhaustion::

@TylerL-uxai
Copy link
Contributor

Nope.. it's broken. I think it's on a weird port now?

@iamlogiq
Copy link

iamlogiq commented Oct 8, 2014

@ellman It's been almost a month now....any answers? Mean-admin is not working locally :(

@TylerL-uxai
Copy link
Contributor

@iamlogiq I wish I could be more helpful, but I don't remember how I did it. Using this thread I did get it working, though.

@iamlogiq
Copy link

iamlogiq commented Oct 9, 2014

@Squ34k3rZ Hey I got it working on heroku just fine using the mean.json file but its locally i'm having trouble. mean install mean-admin doesn't work, putting "mean-admin": "linnovate/mean-admin" in package.json doesn't work, cloning the mean-admin repo and putting it manually in packages/contrib/mean-admin doesn't work so at this point i'm not sure what to do.

It should NOT be this difficult to get this working...It's been a month and I can't find any help on the matter. It's making me regret i choose mean.io for my project. I'm disappointed!

@liorkesos
Copy link
Member

The mean.json was pushed two days ago. We developed it because we did not
have support for the situations Tyler, Abraham and Jen had when deploying
to heroku/openshift. The problems where real. I hope it's much easier now.
Lior
On Oct 9, 2014 3:21 AM, "Didier" [email protected] wrote:

@Squ34k3rZ https://github.com/Squ34k3rZ Hey I got it working on heroku
just fine using the mean.json file but its locally i'm having trouble. mean
install mean-admin doesn't work, putting "mean-admin":
"linnovate/mean-admin" in package.json doesn't work, cloning the mean-admin
repo and putting it manually in packages/contrib/mean-admin doesn't work so
at this point i'm not sure what to do.

It should NOT be this difficult to get this working...It's been a month
and I can't find any help on the matter. It's making me regret i choose
mean.io for my project. I'm disappointed!


Reply to this email directly or view it on GitHub
#13 (comment).

@iamlogiq
Copy link

iamlogiq commented Oct 9, 2014

@liorkesos If you read my previous post, I'm not talking about problems with deploying to heroku, i'm talking about problems locally and how to fix it. Can you tell me how to have mean-admin work locally?

@liorkesos
Copy link
Member

It works for me locally.
What error do you see - what version of the mean-cli? (mean -v) what versoion of the mean repo (check in package.json)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants