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

[Bug] npm run build is breaking #20

Closed
luiscarbonell opened this issue Mar 23, 2019 · 5 comments
Closed

[Bug] npm run build is breaking #20

luiscarbonell opened this issue Mar 23, 2019 · 5 comments
Assignees
Labels
🕷️ bug Something isn't working

Comments

@luiscarbonell
Copy link
Member

npm run build is breaking

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@6.4.1
3 info using node@v8.15.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @liquid-carrot/carrot@0.1.2~prebuild: @liquid-carrot/carrot@0.1.2
6 info lifecycle @liquid-carrot/carrot@0.1.2~build: @liquid-carrot/carrot@0.1.2
7 verbose lifecycle @liquid-carrot/carrot@0.1.2~build: unsafe-perm in lifecycle true
8 verbose lifecycle @liquid-carrot/carrot@0.1.2~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/carrot/workspace/lc-app/carrot/node_modules/.bin:/home/carrot/anaconda3/bin:/home/carrot/anaconda3/bin:/home/carrot/anaconda3/bin:/home/carrot/bin:/home/carrot/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @liquid-carrot/carrot@0.1.2~build: CWD: /home/carrot/workspace/lc-app/carrot
10 silly lifecycle @liquid-carrot/carrot@0.1.2~build: Args: [ '-c',
10 silly lifecycle   'jsdoc -r -c jsdoc.json && git add . && git stash && git checkout gh-pages && git pull && git merge --squash --strategy-option=theirs stash && git stash drop && git commit -m \'Auto-build\' && git push && git checkout master' ]
11 silly lifecycle @liquid-carrot/carrot@0.1.2~build: Returned: code: 1  signal: null
12 info lifecycle @liquid-carrot/carrot@0.1.2~build: Failed to exec build script
13 verbose stack Error: @liquid-carrot/carrot@0.1.2 build: `jsdoc -r -c jsdoc.json && git add . && git stash && git checkout gh-pages && git pull && git merge --squash --strategy-option=theirs stash && git stash drop && git commit -m 'Auto-build' && git push && git checkout master`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid @liquid-carrot/carrot@0.1.2
15 verbose cwd /home/carrot/workspace/lc-app/carrot
16 verbose Linux 4.4.0-143-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v8.15.1
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error @liquid-carrot/carrot@0.1.2 build: `jsdoc -r -c jsdoc.json && git add . && git stash && git checkout gh-pages && git pull && git merge --squash --strategy-option=theirs stash && git stash drop && git commit -m 'Auto-build' && git push && git checkout master`
22 error Exit status 1
23 error Failed at the @liquid-carrot/carrot@0.1.2 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
@luiscarbonell
Copy link
Member Author

Resolved by: 407d924

@luiscarbonell
Copy link
Member Author

Ran into another issue with the build script.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@6.4.1
3 info using node@v8.15.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @liquid-carrot/carrot@0.1.2~prebuild: @liquid-carrot/carrot@0.1.2
6 info lifecycle @liquid-carrot/carrot@0.1.2~build: @liquid-carrot/carrot@0.1.2
7 verbose lifecycle @liquid-carrot/carrot@0.1.2~build: unsafe-perm in lifecycle true
8 verbose lifecycle @liquid-carrot/carrot@0.1.2~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/carrot/workspace/lc-app/carrot/node_modules/.bin:/home/carrot/anaconda3/bin:/home/carrot/anaconda3/bin:/home/carrot/bin:/home/carrot/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @liquid-carrot/carrot@0.1.2~build: CWD: /home/carrot/workspace/lc-app/carrot
10 silly lifecycle @liquid-carrot/carrot@0.1.2~build: Args: [ '-c',
10 silly lifecycle   'jsdoc -r -c jsdoc.json && git add . && git stash && git checkout gh-pages && git pull && git merge --squash --strategy-option=theirs stash && git stash drop && git commit -m \'Auto-build\' && git push && git checkout master' ]
11 silly lifecycle @liquid-carrot/carrot@0.1.2~build: Returned: code: 1  signal: null
12 info lifecycle @liquid-carrot/carrot@0.1.2~build: Failed to exec build script
13 verbose stack Error: @liquid-carrot/carrot@0.1.2 build: `jsdoc -r -c jsdoc.json && git add . && git stash && git checkout gh-pages && git pull && git merge --squash --strategy-option=theirs stash && git stash drop && git commit -m 'Auto-build' && git push && git checkout master`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid @liquid-carrot/carrot@0.1.2
15 verbose cwd /home/carrot/workspace/lc-app/carrot
16 verbose Linux 4.4.0-143-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v8.15.1
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error @liquid-carrot/carrot@0.1.2 build: `jsdoc -r -c jsdoc.json && git add . && git stash && git checkout gh-pages && git pull && git merge --squash --strategy-option=theirs stash && git stash drop && git commit -m 'Auto-build' && git push && git checkout master`
22 error Exit status 1
23 error Failed at the @liquid-carrot/carrot@0.1.2 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@luiscarbonell
Copy link
Member Author

The bug seems to come from the following script:
node_modules/.bin/jsdoc -r -c jsdoc.json

When I run it by hand to debug that is the only script that gives any issues.

@christianechevarria
Copy link
Member

When I run it by hand to debug that is the only script that gives any issues.

Can you elaborate on this?

@luiscarbonell
Copy link
Member Author

luiscarbonell commented Mar 23, 2019

When I run:

npm run build

I get the following stack trace:

#20 (comment)

However, when split npm run build by && and copy/paste the commands individually into the console they all seem to work - except node_modules/.bin/jsdoc -r -c jsdoc.json.

  • node_modules/.bin/jsdoc -r -c jsdoc.json <-- BUG
  • git add .
  • git stash
  • git checkout gh-pages
  • git pull
  • git merge --squash --strategy-option=theirs stash
  • git stash drop
  • git commit -m 'Auto-build'
  • git push
  • git checkout master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕷️ bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants