arunoda / meteor-up-legacy

Production Quality Meteor Deployments
MIT License
2.26k stars 398 forks source link

How to change the node version in meteor up and how to check the installed node my mupx on aws ec2 by ssh #1132

Open chetanchoudhary08 opened 7 years ago

chetanchoudhary08 commented 7 years ago

Hi,

I am getting error while deploying the meteor 1.3 and meteor 1.4 project to aws ubuntu ec2.

the error complains about the npm version , saying that the npm version should atleast be 2 and it cannot read /bundle/package.json

In the mup.json file i changed the node version to 6.7.0 and others so that i get the npm which is greater or equal to version 2. After changing i again ran mupx setup, mupx deploy but again the same error, and in logs i could see that the node and npm version are not changed

-----------------------------------STDERR----------------------------------- npm@2, which has some small npm WARN deprecated backwards-incompatible changes made to npm run-script and npm WARN deprecated semver behavior. npm ERR! install Couldn't read dependencies npm ERR! Failed to parse json npm ERR! Unexpected end of input npm ERR! File: /bundle/bundle/programs/server/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse

    npm ERR! System Linux 3.13.0-98-generic
    npm ERR! command "/usr/bin/node" "/usr/bin/npm" "i"
    npm ERR! cwd /bundle/bundle/programs/server
    npm ERR! node -v v0.10.43
    npm ERR! npm -v 1.4.29
    npm ERR! file /bundle/bundle/programs/server/package.json
    npm ERR! code EJSONPARSE
    npm ERR! 
    npm ERR! Additional logging details can be found in:
    npm ERR!     /bundle/bundle/programs/server/npm-debug.log
    npm ERR! not ok code 0

    => Redeploying previous version of the app

    -----------------------------------STDOUT-----------------------------------

    To see more logs type 'mup logs --tail=50'

    ----------------------------------------------------------------------------

So i thought of manually logging to the aws instance and change the node version over there.

when i logged, firstly when i ran some commands like meteor, node i could see that commands are not found and when i had ran mupx setup it had successfully set up the system.

So next i installed node and npm to the latest version and i came back to my meteor project. I changed the mup.json file by commenting on setupNode,because i already have node to my latest version on my aws ec2 ubuntu.

I ran mupx setup, mupx deploy but again the same error.

So the question is how do i actually change my node version for the meteor project and how does mup setup up the environment on the ec2 instance and where on it, as when i logged in i could not see any commad being accepted, So how does the meteor pick up the installed dependencies and from where.

evallgar commented 7 years ago

Same here. I think this could be some problem of local node version. When I do: $ node --version I get v7.1.0 //This is the appropiate version for Ionic framework which I also use.

When trying to deploy, at verifying deployment i get the following error: ` x Verifying deployment: FAILED

-----------------------------------STDERR-----------------------------------
 npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
npm ERR! install Couldn't read dependencies
npm ERR! Failed to parse json
npm ERR! Unexpected end of input
npm ERR! File: /bundle/bundle/programs/server/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! System Linux 4.4.0-47-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! cwd /bundle/bundle/programs/server
npm ERR! node -v v0.10.43
npm ERR! npm -v 1.4.29
npm ERR! file /bundle/bundle/programs/server/package.json
npm ERR! code EJSONPARSE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /bundle/bundle/programs/server/npm-debug.log
npm ERR! not ok code 0

=> Redeploying previous version of the app

-----------------------------------STDOUT-----------------------------------

To see more logs type 'mup logs --tail=50'

----------------------------------------------------------------------------`