stackvana / hook.io

Open-Source Microservice Hosting Platform
https://hook.io
Other
1.26k stars 117 forks source link

Unexpected token - npm failing in docker-compose build #226

Closed jmatsushita closed 8 years ago

jmatsushita commented 8 years ago

Hi there,

docker-compose build fails with the following error message:

Step 6 : RUN export USER=root && cd /src && rm -rf ./node_modules/ && npm install && npm link
 ---> Running in 574a4462970d
npm WARN package.json hook.io@1.0.0 No repository field.
npm WARN package.json hook.io@1.0.0 license should be a valid SPDX license expression
npm ERR! Linux 4.1.19-boot2docker
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.14.1
npm ERR! file /tmp/npm-7-e1462ccb/unpack-3e8b26de4f6e/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token '\n' at 20:26
npm ERR!     "through2": "^2.0.0""
npm ERR!                          ^
npm ERR! File: /tmp/npm-7-e1462ccb/unpack-3e8b26de4f6e/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! Please include the following file with any support request:
npm ERR!     /src/npm-debug.log
ERROR: Service 'setup' failed to build: The command '/bin/sh -c export USER=root && cd /src && rm -rf ./node_modules/ && npm install && npm link' returned a non-zero code: 1
Marak commented 8 years ago

Sorry about that!

I seem to have slightly broken the master build. After this next release I'll be making all further changes in dev to ensure that docker in master will always work.

Until then you might need to make some minor changes ( like adding the missing comma here )

Marak commented 8 years ago

@jmatsushita I double checked the package and I'm not sure that error is coming from hook.io package

see: https://github.com/bigcompany/hook.io/blob/master/package.json#L84

If thats happening inside the docker I have no idea. I'm not sure where that extra " is coming from.

jmatsushita commented 8 years ago

When looking at the npm debug log it seems it's coming from a tarball from the hooks repo or somewhere along there in the Dockerfile.

I'll run it again in a sec and give more details.

@jmatsushita https://github.com/jmatsushita I double checked the package and I'm not sure that error is coming from hook.io package

see: https://github.com/bigcompany/hook.io/blob/master/package.json#L84

If thats happening inside the docker I have no idea. I'm not sure where that extra " is coming from.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/bigcompany/hook.io/issues/226#issuecomment-214626979

Marak commented 8 years ago

Let me know if you find it. I have no idea where that errored line is.

jmatsushita commented 8 years ago

I confirm the patch fixes this problem.

Marak commented 8 years ago

Thanks @jmatsushita

Merged and fixed.

Sorry about that. We really need to start keeping master in a clean working state so new developers can easily use the system. The docker is really only for testing.

Will make sure we start doing that after the next release.

jmatsushita commented 8 years ago

Awesome! No worries. Happy it might help others that will want to give hook.io a try :)

Marak commented 8 years ago

master branch is not stable right now, so there are going to be a lot of small configuration issues that won't be resolved until I finalize the release.

On Tue, Apr 26, 2016 at 6:04 AM, Jun Matsushita notifications@github.com wrote:

Awesome! No worries. Happy it might help others that will want to give hook.io a try :)

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/bigcompany/hook.io/issues/226#issuecomment-214691162