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

AOT Production Build: Failed #43

Closed
praveenrengarajan opened this issue Mar 12, 2018 · 10 comments
Closed

AOT Production Build: Failed #43

praveenrengarajan opened this issue Mar 12, 2018 · 10 comments

Comments

@praveenrengarajan
Copy link

praveenrengarajan commented Mar 12, 2018

ERROR in @zxing\ngx-scanner\zxing-ngx-scanner.ts(9,2): Error during template compile of 'NgxZxingModule' Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'NgModule' 'NgModule' calls 'ɵmakeDecorator'

Package.json: "@zxing/ngx-scanner": "^1.0.0-dev.a5265f"

Getting above error, while we build project in production mode (aot=true)

@odahcam
Copy link
Member

odahcam commented Mar 12, 2018

Angular version?

@praveenrengarajan
Copy link
Author

Angular CLI: 1.6.3
Node: 6.11.0
OS: win32 x64
Angular: 5.1.3

@werthdavid
Copy link
Member

Please update the library: @zxing/ngx-scanner": "^1.0.0-dev.1.0.0-dev.ec70451 is the latest version, production build with ng build --target=production --environment=prod works fine for me

@praveenrengarajan
Copy link
Author

praveenrengarajan commented Mar 13, 2018

Still facing the same problem, uninstalled the old version and installed ec70451
image

package.json
image

@werthdavid
Copy link
Member

werthdavid commented Mar 13, 2018

@praveenrengarajan
Copy link
Author

praveenrengarajan commented Mar 13, 2018

  • using npm
  • no dependencies in that particular module
  • tsconfig

{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
will try update CLI to 1.7x : nothing difference

@werthdavid
Copy link
Member

I created a new Angular Project with CLI 1.7.3 that gives me this package.json
package.json.txt
running npm run build works fine.. poking in the dark here 😕

@praveenrengarajan
Copy link
Author

angular/angular-cli#3854 (comment) this one helped.

@werthdavid
Copy link
Member

Awesome! 🎉

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants