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

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

Closed
jmatsushita opened this issue Apr 25, 2016 · 8 comments
Closed

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

jmatsushita opened this issue Apr 25, 2016 · 8 comments

Comments

@jmatsushita
Copy link
Contributor

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
Copy link
Collaborator

Marak commented Apr 25, 2016

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
Copy link
Collaborator

Marak commented Apr 26, 2016

@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
Copy link
Contributor Author

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
#226 (comment)

@Marak
Copy link
Collaborator

Marak commented Apr 26, 2016

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

jmatsushita added a commit to jmatsushita/run-service that referenced this issue Apr 26, 2016
@jmatsushita
Copy link
Contributor Author

I confirm the patch fixes this problem.

@Marak
Copy link
Collaborator

Marak commented Apr 26, 2016

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
Copy link
Contributor Author

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

@Marak
Copy link
Collaborator

Marak commented Apr 26, 2016

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
#226 (comment)

Marak added a commit to bigcompany/run-service that referenced this issue May 5, 2016
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

2 participants