angular-example-app icon indicating copy to clipboard operation
angular-example-app copied to clipboard

Issue on Deploy

Open caseydev opened this issue 9 years ago • 20 comments

Hi, its working nicely but i got some issue after deploying through.

npm deploy

I got error like this after updating npm version to 5.3.0

`npm ERR! Invalid version: "1.0"

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Brain\AppData\Roaming\npm-cache_logs\2017-08-25T05_13_32_295Z-debug.log ` where my npm version is 5.3.0 and node 6.9.4

I appreciate your help.

caseydev avatar Aug 25 '17 05:08 caseydev

Hi @caseydev,

I suppose you change the version field in package.json and it's wrong. "1.0" is not a valid format, it should be "1.0.0" (more info here).

Let me know if this helps. If not, let me see more info in that log, and the content of your package.json

PD: sorry for the delay

Ismaestro avatar Aug 29 '17 12:08 Ismaestro

Hi Ismaestro, Yes, i have changed the version. So how can i fix? And i have also update to latest version like node and npm. I am also sorry for late. I were out so

and thanks for the prompt response.

caseydev avatar Sep 06 '17 15:09 caseydev

Your package.json should look like this one:

{
  "name": "angular-example-app",
  "version": "1.0.0",
  "license": "MIT",
  "scripts": {
    "start": "ng serve",
    ...
  },
  "private": true,
  "engines": {
    "node": ">= 6.9.0",
    "npm": ">= 3.0.0"
  },
  "dependencies": {
    "@angular/animations": "4.3.3",
    ...
  }
}

And then you should be able to run npm run deploy... If an error occurs please provide here the hole output.

:)

Ismaestro avatar Sep 06 '17 15:09 Ismaestro

Now its appears>>> I have just clone your project and run it. Its working properly just issue on deploying

`$ npm run deploy

[email protected] deploy E:\work\angular4-example-app ng build --prod --base-href / && angular-cli-ghpages

Hash: d24142b042239627c4a1 Time: 48630ms chunk {0} 0.53dd66f2c8d2d252d10a.chunk.js 77.9 kB {2} [rendered] chunk {1} polyfills.4ee53fb8c82c19faf446.bundle.js (polyfills) 440 kB {5} [in itial] [rendered] chunk {2} main.000cbd435de04952e218.bundle.js (main) 93.1 kB {4} [initial] [r endered] chunk {3} styles.77b4f1dbb3edc30ad830.bundle.css (styles) 228 bytes {5} [init ial] [rendered] chunk {4} vendor.37f48346b198a53bb593.bundle.js (vendor) 3.55 MB [initial] [r endered] chunk {5} inline.faabf15c25104c0ee0e0.bundle.js (inline) 0 bytes [entry] [ren dered] An error occurred! Error: Unspecified error (run without silent option for detail) at E:\work\angular4-example-app\node_modules\gh-pages\lib\index.js:232:19 at _rejected (E:\work\angular4-example-app\node_modules\gh-pages\node_module s\q\q.js:844:24) at E:\work\angular4-example-app\node_modules\gh-pages\node_modules\q\q.js:87 0:30 at Promise.when (E:\work\angular4-example-app\node_modules\gh-pages\node_mod ules\q\q.js:1122:31) at Promise.promise.promiseDispatch (E:\work\angular4-example-app\node_module s\gh-pages\node_modules\q\q.js:788:41) at E:\work\angular4-example-app\node_modules\gh-pages\node_modules\q\q.js:60 4:44 at runSingle (E:\work\angular4-example-app\node_modules\gh-pages\node_module s\q\q.js:137:13) at flush (E:\work\angular4-example-app\node_modules\gh-pages\node_modules\q\ q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:95:7) at process._tickCallback (internal/process/next_tick.js:161:9) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] deploy: ng build --prod --base-href / && ang ular-cli-ghpages npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] deploy script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\kumar-gajurel\AppData\Roaming\npm-cache_logs\2017-09-06T1 5_37_27_619Z-debug.log `

caseydev avatar Sep 06 '17 15:09 caseydev

Ok. Let's try few things:

  1. Run ng build --prod --base-href and check that nothing fails.

  2. Run angular-cli-ghpages and see the output. Probably you have to enter your github username and password in order to deploy.

  3. Paste here that log 2017-09-06T1 5_37_27_619Z-debug.log

PD: If the commands do not work, install them globally, that is:

npm install -g angular-cli and npm install -g angular-cli-ghpages.

And be sure to have the right permissions (maybe as sudo? / Administrator).

Ismaestro avatar Sep 06 '17 16:09 Ismaestro

See this too.

Ismaestro avatar Sep 06 '17 16:09 Ismaestro

Yes, i have tried this but now got this error log $ angular-cli-ghpages An error occurred! Error: Unspecified error (run without silent option for detail) at C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\angular-cli-ghpag es\node_modules\gh-pages\lib\index.js:232:19 at _rejected (C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\angula r-cli-ghpages\node_modules\q\q.js:844:24) at C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\angular-cli-ghpag es\node_modules\q\q.js:870:30 at Promise.when (C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\ang ular-cli-ghpages\node_modules\q\q.js:1122:31) at Promise.promise.promiseDispatch (C:\Users\kumar-gajurel\AppData\Roaming\n pm\node_modules\angular-cli-ghpages\node_modules\q\q.js:788:41) at C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\angular-cli-ghpag es\node_modules\q\q.js:604:44 at runSingle (C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\angula r-cli-ghpages\node_modules\q\q.js:137:13) at flush (C:\Users\kumar-gajurel\AppData\Roaming\npm\node_modules\angular-cl i-ghpages\node_modules\q\q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:95:7) at process._tickCallback (internal/process/next_tick.js:161:9)

caseydev avatar Sep 06 '17 17:09 caseydev

image

caseydev avatar Sep 06 '17 17:09 caseydev

what was the problem??

Ismaestro avatar Sep 06 '17 18:09 Ismaestro

how to check is it working or not? And it doesn't ask username or password

caseydev avatar Sep 07 '17 01:09 caseydev

Yes, its created now how to see result.

image

caseydev avatar Sep 07 '17 03:09 caseydev

Thanks mate,, Its working

caseydev avatar Sep 07 '17 09:09 caseydev

Yes I see: https://caseydev.github.io/ngApp/

So there is a problem with the CNAME file, which you should remove from your project. I'm going to update the documentation. Thanks.

Ismaestro avatar Sep 07 '17 09:09 Ismaestro

Thank you boss. I will ping you in future when i will got issues. I am beginner of angular and can you give me some good resources if possible.

caseydev avatar Sep 07 '17 09:09 caseydev

Start here. Its mandatory. Be patient, and learn from official sources.

Ismaestro avatar Sep 07 '17 10:09 Ismaestro

Thanks a lot. Ok i am following from official. What about the configure with webpack for bundle and sass loader. Do you have make this yet?

caseydev avatar Sep 07 '17 10:09 caseydev

I don't worry about webpack and sass loader, angular-cli does. So in .angular.json file you can load any scss, css files. Once you've done with the official tutorial, read more about angular-cli.

BR

Ismaestro avatar Sep 07 '17 10:09 Ismaestro

ok thanks once again for nice collaboration :) I appreciate your help and guideline

caseydev avatar Sep 07 '17 11:09 caseydev

I have successfully published my project here: https://ahmedohadi.github.io/SD_YMCA/

however, I could not figure out why pics are not shown as same as the background image, any advice please?

ahmedohadi avatar Mar 28 '19 03:03 ahmedohadi

@caseydev Glad you figured it out, but you did not answer the question "what was wrong/how did you fix this error: Error: Unspecified error (run without silent option for detail?

good job and happy learning!

ahmedohadi avatar Mar 28 '19 03:03 ahmedohadi