How to fix deploy angular 8 project with Github pages - angular8

I deployed with angular-cli-ghpages, followed the steps:https://www.npmjs.com/package/angular-cli-ghpages
1.git remote add origin https://github.com/username/epositoryname.git
2.ng add angular-cli-ghpages
3.ng deploy
When excute deploy show me this:
ng deploy --base-href=https://github.com/Azaria-CR/portafolio1.git
📦 Building "dogapi". Configuration: "production". Your base-href: "https://github.com/Azaria-CR/portafolio1.git"
chunk {0} runtime-es2015.85f895af57b038f1e5b4.js (runtime) 2.82 kB [entry] [rendered]
chunk {1} main-es2015.12ae7f54f3b8c7ac770e.js (main) 367 kB [initial] [rendered]
chunk {2} polyfills-es2015.0fe6949bc5ff4b784062.js (polyfills) 64 kB [initial] [rendered]
chunk {3} polyfills-es5-es2015.a83ac866abc867bfd530.js (polyfills-es5) 222 kB [initial] [rendered]
chunk {4} styles.09e2c710755c8867a460.css (styles) 0 bytes [initial] [rendered]
Date: 2019-09-18T01:53:17.038Z - Hash: 555aa990c3829b3b1bf6 - Time: 122860ms
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.
🚀 Successfully published via angular-cli-ghpages! Have a nice day!
but it does not work
when i finish show me
the blank page
git version 2.23.0.windows.1
Angular CLI: 8.3.4
Node: 10.16.3
npm 6.11.3

I was having the same problem and this worked for me:
When deploying:
ng deploy --base-ref=/YourRepositoryName/
Substitute YourRepositoryName with the name of your project and be careful with the final /.
I hope it help you to solve the problem.

Related

Angular 8 compile Issue

I have a problem compiling my Angular 8 application:
chunk {main} main.js, main.js.map (main) 11.7 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 141 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 12.4 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 2.64 MB [initial] [rendered]
Date: 2020-07-28T21:19:53.546Z - Hash: 770b00fb42b4664247d8 - Time: 10789ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
: Compiled successfully.
Date: 2020-07-28T21:21:23.611Z - Hash: 0c9595fa24b10bb14e7a
4 unchanged chunks
chunk {main} main.js, main.js.map (main) 11.7 kB [initial] [rendered]
Time: 73459ms
: Compiled successfully.
92% additional asset processing copy-webpack-plugin
When the project is being compiled, it will stuck at that last line reporting 92% of additional asset processing by copy-webpack-plugin.
Please help me to resolve this issue.
Maybe just try to stop ng serve and try it once again?

Nativescript-vue Not Live Updating

I used to run the command : tns run android --bundle. And when i saved the changes, they were automatically updated in the physical and virtual android emulators.
Now when i save the changes, nothing happens and have to run the command again to see the changes.
When i save the project, it appears the following message:
File change detected. Starting incremental webpack compilation...
Hash: 2e482eb5460af6f4127a
Version: webpack 4.27.1
Time: 1119ms
Built at: 12/04/2019 11:31:32 AM
Asset Size Chunks Chunk Names
a3a53c6e399658f9e1f5.hot-update.json 48 bytes [emitted]
bundle.a3a53c6e399658f9e1f5.hot-update.js 10.1 KiB bundle [emitted] bundle
bundle.js 892 KiB bundle [emitted] bundle
runtime.js 71.4 KiB runtime [emitted] runtime
+ 1 hidden asset
Entrypoint bundle = runtime.js vendor.js bundle.js bundle.a3a53c6e399658f9e1f5.hot-update.js
[../node_modules/nativescript-dev-webpack/style-hot-loader.js!../node_modules/nativescript-dev-webpack/apply-css-loader.js!../node_modules/css-loader/dist/cjs.js?!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/vue-loader/lib/index.js?!./pages/VistaPrueba.vue?vue&type=style&index=0&id=f4390c96&scoped=true&lang=css&] ../node_modules/nativescript-dev-webpack/style-hot-loader.js!../node_modules/nativescript-dev-webpack/apply-css-loader.js!../node_modules/css-loader/dist/cjs.js??ref--1-2!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/vue-loader/lib??vue-loader-options!./pages/VistaPrueba.vue?vue&type=style&index=0&id=f4390c96&scoped=true&lang=css& 1.26 KiB {bundle} [built]
[../node_modules/ts-loader/index.js?!../node_modules/vue-loader/lib/index.js?!./pages/VistaPrueba.vue?vue&type=script&lang=ts&] ../node_modules/ts-loader??ref--4!../node_modules/vue-loader/lib??vue-loader-options!./pages/VistaPrueba.vue?vue&type=script&lang=ts& 1.12 KiB {bundle} [built]
[../node_modules/vue-loader/lib/loaders/templateLoader.js?!../node_modules/vue-loader/lib/index.js?!./pages/VistaPrueba.vue?vue&type=template&id=f4390c96&scoped=true&] ../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/vue-loader/lib??vue-loader-options!./pages/VistaPrueba.vue?vue&type=template&id=f4390c96&scoped=true& 5.58 KiB {bundle} [built]
[./ sync ^\.\/app\.(css|scss|less|sass)$] . sync nonrecursive ^\.\/app\.(css|scss|less|sass)$ 175 bytes {bundle} [built]
[./ sync recursive (?<!\bApp_Resources\b.*)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$] . sync (?<!\bApp_Resources\b.*)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$ 558 bytes {bundle} [built]
[./pages/VistaPrueba.vue] 1.21 KiB {bundle} [built]
[./routes.ts] 2.57 KiB {bundle} [built]
+ 418 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
There were some bugs in the NativeScript CLI which prevents the Hot Module Reload (HMR) which should refresh the application in your emulators.
A quick fix is to run the command:
tns run android --no-hmr
Which practically restarts/reloads the application completely.

Files generated during ng build --prod --configuration=development are different from what publish targets expect to copy

I am very new to the DevOps side of things for Angular CLI and am encountering this problem with dotnet publish stage in the build pipeline.
What I am working on is an Asp.Net core 2.1 Angular 8 web project.
I had used a Asp.Net core Angular project template.
It had Angular 6 and the requirement is to work off of Angular 8.
hence I updated package.json to reflect the same.
When I run > ng build --prod --configuration=development, below are the files generated:
chunk {0} runtime.741402d1d47331ce975c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.ad82baa5bb28a734da67.js (main) 2.32 MB [initial] [rendered]
chunk {2} polyfills.6566791a677aeff5bc67.js (polyfills) 42.9 kB [initial] [rendered]
chunk {3} polyfills-es5.28de8d190640d51d92af.js (polyfills-es5) 68.1 kB [initial] [rendered]
chunk {4} styles.78e9718c847473f8c3a9.css (styles) 64.5 kB [initial] [rendered]
chunk {scripts} scripts.03e042f1f102bf0e2ed8.js (scripts) 19.8 kB [entry] [rendered]
But what the publish targets expect to copy are different: Notice the Hash between filename and extension of each file:
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\fontawesome-webfont.912ec66d7572ff821749.svg" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\fontawesome-webfont.674f50d287a8c48dc19b.eot" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\fontawesome-webfont.af7ae505a9eed503f8b8.woff2" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\fontawesome-webfont.b06871f281fee6b241d6.ttf" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\fontawesome-webfont.fee66e712a8a08eef580.woff" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\main.0d2c317a44a9c52889ec.js" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\polyfills.40bb869b748691701bbd.js" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\runtime.a66f828dca56eeb90e02.js" because it was not found.
error MSB3030: Could not copy the file "wwwroot\clientapp\dist\styles.afee324584e31a3b1e79.css" because it was not found.
##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
Expected Results:
dotnet publish build targets picks up the files generated during build and copies it over to wwwroot/clientapp/dist
Actual result:
dotnet publish build targets tries to look for files which are not existing.
Suspecting if the template has some code to auto generate based on the old package.json references

Aurelia app is not launched using au run cli command

i am very new to Aurelia framework, hence following the guide to create project https://aurelia.io/docs/tutorials/creating-a-contact-manager/#setting-up-your-machine
I am using au -v
0.33.1
But, when i use au run to run the app
when i try to open the application in browser blow error message comes, can some one helps me?
au run
Starting 'configureEnvironment'...
Finished 'configureEnvironment'
Starting 'runWebpack'...
(node:5780) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Project is running at http://localhost:8080
webpack output is served from /
Content not from webpack is served from F:\AureliaWorkspace\sampleApp\dist
404s will fallback to /index.html
Finished 'runWebpack'
Hash: 2a2f417dfbd63c84f978
Version: webpack 4.7.0
Time: 16633ms
Built at: 2018-05-05 20:24:50
Asset Size Chunks Chunk Names
app.2a2f417dfbd63c84f978.bundle.js 3 MiB app [emitted] [big] app
vendor.2a2f417dfbd63c84f978.bundle.js 489 KiB vendor [emitted] [big] vendor
index.html 589 bytes [emitted]
Entrypoint app [big] = app.2a2f417dfbd63c84f978.bundle.js
Entrypoint vendor [big] = vendor.2a2f417dfbd63c84f978.bundle.js
[./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js] 5.17 KiB {app} [built]
[./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js] 14.4 KiB {app} [built]
[./node_modules/aurelia-pal/dist/native-modules/aurelia-pal.js] 2.18 KiB {app} [built]
[./node_modules/aurelia-polyfills/dist/native-modules/aurelia-polyfills.js] 24.4 KiB {app} [built]
[./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js] 585 bytes {app} [built]
[./node_modules/aurelia-webpack-plugin/runtime/pal-loader-entry.js] 1.56 KiB {app} [built]
[./node_modules/bluebird/js/browser/bluebird.js] 175 KiB {vendor} {app} [built]
[./node_modules/bluebird/js/browser/bluebird.js-exposed] 65 bytes {vendor} {app} [built]
[./node_modules/process/browser.js] 5.29 KiB {vendor} {app} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {vendor} {app} [built]
[aurelia-framework] ./node_modules/aurelia-framework/dist/native-modules/aurelia-framework.js 14 KiB {app} [built]
[aurelia-pal-browser] ./node_modules/aurelia-pal-browser/dist/native-modules/aurelia-pal-browser.js 16.3 KiB {app} [built]
[main] ./src/main.js 5.16 KiB {app} [built]
[0] multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper 52 bytes {app} [built]
[1] multi bluebird 28 bytes {vendor} [built]
+ 262 hidden modules
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 1.36 MiB 0
Entrypoint undefined = index.html
[./node_modules/html-webpack-plugin/lib/loader.js!./index.ejs] 890 bytes {0} [built]
[./node_modules/lodash/lodash.js] 527 KiB {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
i ï½¢wdmï½£: wait until bundle finished: /app.2a2f417dfbd63c84f978.bundle.js
i ï½¢wdmï½£: wait until bundle finished: /vendor.2a2f417dfbd63c84f978.bundle.js
× 「wdm」: ConcurrentCompilationError: You ran Webpack twice. Each instance only supports a single concurrent compilation at a time.
at Compiler.run (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:151:37)
at rebuild (F:\AureliaWorkspace\sampleApp\node_modules\webpack-dev-server\node_modules\webpack-dev-middleware\lib\context.js:81:24)
at done (F:\AureliaWorkspace\sampleApp\node_modules\webpack-dev-server\node_modules\webpack-dev-middleware\lib\context.js:59:7)
at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\AureliaWorkspace\sampleApp\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:18:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (F:\AureliaWorkspace\sampleApp\node_modules\tapable\lib\Hook.js:35:21)
at emitRecords.err (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:203:22)
at Compiler.emitRecords (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:315:39)
at emitAssets.err (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:197:10)
at hooks.afterEmit.callAsync.err (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:301:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\AureliaWorkspace\sampleApp\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:15:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (F:\AureliaWorkspace\sampleApp\node_modules\tapable\lib\Hook.js:35:21)
at asyncLib.forEach.err (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:298:27)
at done (F:\AureliaWorkspace\sampleApp\node_modules\neo-async\async.js:2854:11)
at F:\AureliaWorkspace\sampleApp\node_modules\neo-async\async.js:2805:7
at MemoryFileSystem.writeFile (F:\AureliaWorkspace\sampleApp\node_modules\memory-fs\lib\MemoryFileSystem.js:328:9)
at writeOut (F:\AureliaWorkspace\sampleApp\node_modules\webpack\lib\Compiler.js:284:29)
This is the relevant error:
ConcurrentCompilationError: You ran Webpack twice. Each instance only supports a single concurrent compilation at a time.
You're not doing anything wrong here, this is a regression caused by some combination of changes in aurelia-cli and webpack. See this github issue
In short, lazy mode is not working properly. The workaround is to always use the --watch flag with au run.
au run --watch should work.

ng serve error - typescript mismatch version (maybe)

aspnetboilerplate core template 3.3.2
"ng serve" issues this output (below)
additional information:
is the error generated from the typescritp mismatch version?
my typescript should be 2.6.1 (npm view typescript version)
i've tried to: npm install typescript#2.4.0
there is another problem?
[ng serve output]
#angular/compiler-cli#4.4.6 requires typescript#'>=2.1.0 <2.4.0' but 2.4.0 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.
Please run the following command to install a compatible version of TypeScript.
npm install typescript#'>=2.1.0 <2.4.0'
To disable this warning run "ng set warnings.typescriptMismatch=false".
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2017-11-16T09:52:15.693Z
Hash: f55af8b09fa2b7f58749
Time: 32705ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 483 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 1.09 MB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 1.61 MB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 14.7 MB [initial] [rendered]
WARNING in ./node_modules/abp-ng2-module/node_modules/#angular/core/esm5/core.js
6438:15-36 Critical dependency: the request of a dependency is an expression
at ImportLazyContextDependency.getWarnings (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\dependencies\ContextDependency.js:39:18)
at Compilation.reportDependencyErrorsAndWarnings (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:703:24)
at Compilation.finish (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:561:9)
at applyPluginsParallel.err (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compiler.js:506:17)
at C:\angular\AbpCore\3.3.2\angular\node_modules\tapable\lib\Tapable.js:289:11
at _addModuleChain (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:507:11)
at processModuleDependencies.err (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:477:14)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
# ./node_modules/abp-ng2-module/node_modules/#angular/core/esm5/core.js
# ./node_modules/abp-ng2-module/src/multi-tenancy/abp-multi-tenancy.service.ts
# ./src/shared/session/app-session.service.ts
# ./src/root.module.ts
# ./src/main.ts
# multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
WARNING in ./node_modules/abp-ng2-module/node_modules/#angular/core/esm5/core.js
6458:15-102 Critical dependency: the request of a dependency is an expression
at ImportLazyContextDependency.getWarnings (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\dependencies\ContextDependency.js:39:18)
at Compilation.reportDependencyErrorsAndWarnings (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:703:24)
at Compilation.finish (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:561:9)
at applyPluginsParallel.err (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compiler.js:506:17)
at C:\angular\AbpCore\3.3.2\angular\node_modules\tapable\lib\Tapable.js:289:11
at _addModuleChain (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:507:11)
at processModuleDependencies.err (C:\angular\AbpCore\3.3.2\angular\node_modules\webpack\lib\Compilation.js:477:14)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
# ./node_modules/abp-ng2-module/node_modules/#angular/core/esm5/core.js
# ./node_modules/abp-ng2-module/src/multi-tenancy/abp-multi-tenancy.service.ts
# ./src/shared/session/app-session.service.ts
# ./src/root.module.ts
# ./src/main.ts
# multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in Error: Metadata version mismatch for module C:/angular/AbpCore/3.3.2/angular/node_modules/abp-ng2-module/node_modules/#angular/http/http.d.ts, found version 4, expected 3, resolving symbol ABP_HTTP_PROVIDER in C:/angular/AbpCore/3.3.2/angular/node_modules/abp-ng2-module/src/abp.module.ts, resolving symbol RootModule in C:/angular/AbpCore/3.3.2/angular/src/root.module.ts, resolving symbol RootModule in C:/angular/AbpCore/3.3.2/angular/src/root.module.ts
at Error (native)
at syntaxError (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler\bundles\compiler.umd.js:1729:34)
at simplifyInContext (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler\bundles\compiler.umd.js:24979:23)
at StaticReflector.simplify (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler\bundles\compiler.umd.js:24991:13)
at StaticReflector.annotations (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler\bundles\compiler.umd.js:24418:41)
at _getNgModuleMetadata (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler-cli\src\ngtools_impl.js:138:31)
at _extractLazyRoutesFromStaticModule (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler-cli\src\ngtools_impl.js:109:26)
at Object.listLazyRoutesOfModule (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler-cli\src\ngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\angular\AbpCore\3.3.2\angular\node_modules\#angular\compiler-cli\src\ngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (C:\angular\AbpCore\3.3.2\angular\node_modules\#ngtools\webpack\src\plugin.js:241:66)
at _donePromise.Promise.resolve.then.then.then.then.then (C:\angular\AbpCore\3.3.2\angular\node_modules\#ngtools\webpack\src\plugin.js:495:24)
at process._tickCallback (internal/process/next_tick.js:109:7)
webpack: Failed to compile.
I had the same issue. Seems that will be a problem with "abp-ng2-module".
So force npm to install abp-ng2-module v1.2.0.
In package.json dependencies replace "abp-ng2-module": "^1.2.0" with "abp-ng2-module": "1.2.0"
Delete node_modules folder and package.json.lock file
Run npm install
Run ng serve
It works with only two steps:
Delete node_modules folder
Run yarn