arunoda / meteor-up-legacy

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

Failed to parse json while deploying #1092

Open c9s opened 8 years ago

c9s commented 8 years ago

I'm using Meteor 1.3.5_1 and the latest mup from npmjs

while I was deploying the app, it shows the error like this:

  -----------------------------------STDERR-----------------------------------
    npm ERR! install Couldn't read dependencies
    npm ERR! Failed to parse json
    npm ERR! Unexpected end of input
    npm ERR! File: /opt/shaka/tmp/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-74-generic
    npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
    npm ERR! cwd /opt/shaka/tmp/bundle/programs/server
    npm ERR! node -v v0.10.40
    npm ERR! npm -v 1.4.28
    npm ERR! file /opt/shaka/tmp/bundle/programs/server/package.json
    npm ERR! code EJSONPARSE
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR!     /opt/shaka/tmp/bundle/programs/server/npm-debug.log
    npm ERR! not ok code 0

If I cat the /opt/shaka/tmp/bundle/programs/server/package.json, it shows something like this:

{ 

It looks like the file was corrupted.

If I ssh into the server, and re-extract the tmp/bundle.tar.gz, the file is still the same.

c9s commented 8 years ago

I already pasted it on the top

c9s commented 8 years ago

really dont know why, I have fight for this a couple of hours

shyal commented 8 years ago

Can you show us the original package.json that's in your project root?

mfeuermann commented 8 years ago

I have same problem here my package.json

{ "name": "meteor-soptikovo", "version": "0.1.0", "description": "Administracni system projektu Soptikovo lyzovani", "scripts": { "test": "mocha .scripts/mocha_boot.js client//tests//*.js --compilers js:babel-core/register", "storybook": "start-storybook -p 9001" }, "repository": { "type": "git", "url": "git+https://github.com/mfeuermann/meteor-soptikovo-registrace" }, "author": "", "license": "ISC", "dependencies": { "bcrypt": "^0.8.7", "formsy-react": "^0.18.1", "formsy-react-components": "^0.8.1", "logatim": "^0.9.0", "loggly": "^1.1.0", "mantra-core": "^1.2.0", "moment": "^2.14.1", "react": "^15.0.0", "react-bootstrap": "^0.30.2", "react-dom": "^15.0.0", "react-komposer": "^1.3.0", "react-mounter": "^1.0.0", "react-simple-di": "^1.0.1", "touch": "^1.0.0", "underscore": "^1.8.3", "winston": "^2.2.0", "winston-loggly-bulk": "^1.3.3" }, "devDependencies": { "@kadira/storybook": "^1.x.x", "enzyme": "^2.2.0", "jsdom": "^8.0.4", "eslint": "2.7.x", "eslint-plugin-react": "4.3.x", "babel-core": "6.x.x", "babel-plugin-react-require": "2.x.x", "babel-polyfill": "6.x.x", "babel-preset-es2015": "6.x.x", "babel-preset-react": "6.x.x", "babel-preset-stage-2": "6.x.x", "babel-root-slash-import": "1.x.x", "sinon": "1.17.x", "chai": "3.x.x", "mocha": "2.x.x", "react-addons-test-utils": "^15.0.0" } }

LucasBassetti commented 8 years ago

+1