vyakymenko / angular-seed-express

[DEPRECATED, Please use https://github.com/vyakymenko/angular-express] Extensible, reliable and modular starter project for Angular 7 with statically typed build AoT compilation, Express server and PM2 Daemon.

Home Page:https://github.com/vyakymenko/angular-seed-express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aot compilation error?

ghatul opened this issue · comments

Hi,

If i hit npm run build.prod it getting below error. i dont undestand what to do next.

"dependencies": {
"@"-
"angular/common": "^2.1.2",
"angular/compiler": "^2.1.2",
"angular/core": "^2.1.2",
"angular/forms": "^2.1.2",
"angular/http": "^2.1.2",
"angular/platform-browser": "^2.1.2",
"angular/platform-browser-dynamic": "^2.1.2",
"angular/router": "^3.1.2",

and

"angular/compiler-cli": "~2.1.2",
"angular/platform-server": "~2.1.2",
"angular/tsc-wrapped": "0.3.0",

my node version is:~ v8.2.1
my npm version is:~v5.3.0

Please help me out........

[15:58:46] Starting 'compile.ahead.prod'...
can't resolve module @angular/core/src/di/opaque_token from /home/gk/dist/tmp_client/index.ts
TypeError: Cannot read property 'parse' of undefined
at ReflectorHost.normalizeAssetUrl (/home/chetan/gk/modules/@angular/compiler-cli/src/reflector_host.ts:70:30)
at ReflectorHost.findDeclaration (/home/chetan/gk/modules/@angular/compiler-cli/src/reflector_host.ts:175:29)
at StaticReflector.initializeConversionMap (/home/gk/modules/@angular/compiler-cli/src/static_reflector.ts:183:34)
at new StaticReflector (/home/gk/modules/@angular/compiler-cli/src/static_reflector.ts:72:57)
at Function.CodeGenerator.create (/home/gk/modules/@angular/compiler-cli/src/codegen.ts:112:29)
at codegen (/home/gk/tools/tasks/seed/compile.ahead.prod.ts:14:26)
at Object.main (/home/gk/tools/@angular/tsc-wrapped/src/main.ts:44:12)
at module.exports (/home/gk/tools/tasks/seed/compile.ahead.prod.ts:40:7)
at AnonTask.run (/home/c-next/gk/tools/utils/seed/tasks_tools.ts:31:18)
at Gulp. (/home/gk/tools/utils/seed/tasks_tools.ts:60:27)
Compilation failed

Hi @vyakymenko, i tried above solution but it getting drastic file changes also getting conflicts.
I am using angular 2 (repository tag 2.1.2) i dont want to move on next angular 2 versions or on angular 4.

Is there any another way to fix it?

Hi @ghatul , migration will be the best solution... Otherwise, you need to debug your building system, that is not supported with the current version of angular-seed-express.

Hi @vyakymenko.
ok but, on which version or on which repository tag is prefarable for me for migration.
How i decide?

Hi @ghatul ,

It depends on your package.json configuration, tools.

The best solution that you can do, it's a clean clone repo, and copy your logic and components to new clone.

@vyakymenko

ok i will try. thanks.