question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build:prod:deploy command failed

See original GitHub issue

I’m submitting a…

Bug report

In package

ng-toolkit/serverless

Current behavior

ran ng add @ng-toolkit/serverless --provider firebase --firebaseProject cmacapp-b7482 ran yarn build:prod:deploy saw:

Error: An unexpected error has occurred.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-app@0.0.0 deploy: `cp-cli dist/ functions/dist/ && cd functions && npm install && firebase deploy`
npm ERR! Exit status 2
npm ERR!
npm ERR! my-app@0.0.0 deploy: `cp-cli dist/ functions/dist/ && cd functions && npm install && firebase deploy`                                                        
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the my-app@0.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nella\AppData\Roaming\npm-cache\_logs\2018-05-27T17_50_19_964Z-debug.log
error Command failed with exit code 2.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected behavior

I would expect the deploy to be successful

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
markgohocommented, Jun 4, 2018

Hey @maciejtreder I’m sorry I haven’t gotten back around to testing this. I’ll make sure to do it this evening. Thank you for your excellent work on bringing this functionality to us! 🥂

1reaction
markgohocommented, May 27, 2018

Repo: https://github.com/markgoho/myApp

Full log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Nella\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'deploy' ]
2 info using npm@6.1.0
3 info using node@v8.11.1
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info lifecycle my-app@0.0.0~predeploy: my-app@0.0.0
6 info lifecycle my-app@0.0.0~deploy: my-app@0.0.0
7 verbose lifecycle my-app@0.0.0~deploy: unsafe-perm in lifecycle true
8 verbose lifecycle my-app@0.0.0~deploy: PATH: C:\Users\Nella\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Nella\Documents\GitHub\myApp\node_modules\.bin;C:\Users\Nella\Documents\GitHub\myApp\node_modules\.bin;C:\Users\Nella\AppData\Local\Yarn\Data\link\node_modules\.bin;C:\Users\Nella\Documents\GitHub\myApp\node_modules\.bin;C:\Users\Nella\AppData\Local\Yarn\Data\link\node_modules\.bin;C:\Program Files\libexec\lib\node_modules\npm\bin\node-gyp-bin;C:\Program Files\lib\node_modules\npm\bin\node-gyp-bin;C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Program Files\nodejs;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Nella\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\ImageMagick-7.0.7-Q16;C:\Python27;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\PuTTY;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Ruby23\bin;C:\Users\Nella\AppData\Local\Microsoft\WindowsApps;C:\Users\Nella\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Users\Nella\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\Nella\AppData\Roaming\npm;C:\Users\Nella\AppData\Local\Yarn\bin
9 verbose lifecycle my-app@0.0.0~deploy: CWD: C:\Users\Nella\Documents\GitHub\myApp
10 silly lifecycle my-app@0.0.0~deploy: Args: [ '/d /s /c',
10 silly lifecycle   'cp-cli dist/ functions/dist/ && cd functions && npm install && firebase deploy' ]
11 silly lifecycle my-app@0.0.0~deploy: Returned: code: 2  signal: null
12 info lifecycle my-app@0.0.0~deploy: Failed to exec deploy script
13 verbose stack Error: my-app@0.0.0 deploy: `cp-cli dist/ functions/dist/ && cd functions && npm install && firebase deploy`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Nella\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304: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> (C:\Users\Nella\AppData\Roaming\npm\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:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid my-app@0.0.0
15 verbose cwd C:\Users\Nella\Documents\GitHub\myApp
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Nella\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "deploy"
18 verbose node v8.11.1
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 2
22 error my-app@0.0.0 deploy: `cp-cli dist/ functions/dist/ && cd functions && npm install && firebase deploy`
22 error Exit status 2
23 error Failed at the my-app@0.0.0 deploy script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Deployment error build.command failed - Netlify Support Forums
Already for weeks I am trying to deploy my repo GitHub - ilukin89/MovieParadise-client: movie database website based on React (redux branch) on Netlify, ......
Read more >
netlify deploy issue, "build.command" failed - Stack Overflow
Its says npm not able to find a file but do not know which one. Can you run the production build of website...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
Deployment - Angular
The command builds your application and uploads the production assets to Firebase. In the table below, you can find a list of packages...
Read more >
Command failed with exit code 1: npm run build - Netlify fix 2020
Udemy Courses:- 9 React Projects on Udemy - https://bit.ly/2D83M8c- 9 React Projects on Gumroad ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found