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

Can't compile into webpage using Angular CLI (ng build) #43

Open
zhantyzgz opened this issue Jun 8, 2017 · 4 comments
Open

Can't compile into webpage using Angular CLI (ng build) #43

zhantyzgz opened this issue Jun 8, 2017 · 4 comments

Comments

@zhantyzgz
Copy link

zhantyzgz commented Jun 8, 2017

Here's the log:

C:\Users\Zhant\Documents\Angular2\awam>ng build --aot --deploy-url awam/
Hash: 335a50cc5a921f034480
Time: 4988ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 157 kB {5} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.js.map (styles) 224 kB {5} [initial] [rendered]
chunk    {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 163 kB {5} [initial] [rendered]
chunk    {3} main.bundle.js, main.bundle.js.map (main) 1.1 kB {4} [initial] [rendered]
chunk    {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 813 kB [initial] [rendered]
chunk    {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported.
Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in 
C:/Users/Zhant/Documents/Angular2/awam/node_modules/angular2-fullcalendar/node_modules/@angular/core/src/di/metadata.d.ts, 
resolving symbol OpaqueToken in C:/Users/Zhant/Documents/Angular2/awam/node_modules/angular2-fullcalendar/node_modules/@angular/core/src/di/opaque_token.d.ts, 
resolving symbol OpaqueToken in C:/Users/Zhant/Documents/Angular2/awam/node_modules/angular2-fullcalendar/node_modules/@angular/core/src/di/opaque_token.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Users\Zhant\Documents\Angular2\awam\src'
 @ ./src/main.ts 4:0-74
 @ multi ./src/main.ts
@Seao
Copy link

Seao commented Jun 8, 2017

I'm trying to upgrade an ionic app changing to Ionic 3 & Angular 4 and I have the same issue. I'm compiling with ionic cordova run ios --rollup --prod. It's working without the --prod flag.

Package

  • angular/core: 4.1.2,
  • angular/compiler-cli: 4.1.2
  • angular2-fullcalendar: ^1.1.1

Issue

$ ionic cordova run ios --rollup --prod
Running app-scripts build: --prod --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser

[16:54:04]  build prod started ... 
[16:54:04]  clean started ... 
[16:54:04]  clean finished in 2 ms 
[16:54:04]  copy started ... 
[16:54:04]  ngc started ...
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date.
Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in /Users/seao/hbc_app/node_modules/angular2-fullcalendar/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in /Users/seao/hbc_app/node_modules/angular2-fullcalendar/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in /Users/seao/hbc_app/node_modules/angular2-fullcalendar/node_modules/@angular/core/src/di/opaque_token.d.ts```

@KrisBraun
Copy link

I got the same error when trying to import this package as a module.

I don't think this package is using the correct approach by including the component directly rather than importing a module, because it's pulling in a separate dependancy on a specific version of Angular. This package uses proper module imports and works for me: https://github.com/lbertenasco/ap-ng2-fullcalendar

@giorgiofellipe
Copy link

@nekken the solution is kinda straightforward, could you please take a look?

@giorgiofellipe
Copy link

Specifying paths to @angular inside AngularCLI’s tsconfig.json solved for me.

“paths”: { “@angular/*“: [“../node_modules/@angular/*“] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants