Skip to content

[SOLVED] Using of npm link lead to AoT build failure with "Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported" #1834

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

Closed
bobrosoft opened this issue Jul 21, 2017 · 11 comments

Comments

@bobrosoft
Copy link
Contributor

bobrosoft commented Jul 21, 2017

Hope that solution will help somebody:
add next into "compilerOptions" of tsconfig.webpack.json and tsconfig.json:

    "baseUrl": ".",
    "paths": {
      "@angular/*": ["node_modules/@angular/*"]
    }

References:

@bobrosoft
Copy link
Contributor Author

Will be closed tomorrow.

@PatrickJS
Copy link
Owner

Thanks for figuring it out. Can you make a PR

@bobrosoft
Copy link
Contributor Author

@gdi2290 ou, ye, even forgot about that :) Will do it later.

@bobrosoft
Copy link
Contributor Author

bobrosoft commented Jul 22, 2017

@bobrosoft
Copy link
Contributor Author

Thanks for merge 🐻

@PatrickJS
Copy link
Owner

thanks for finding the fix

@qasimraza1979
Copy link

qasimraza1979 commented Oct 11, 2017

This does not solve my problem.....

Please advice should the error below considered as a different issue or its same. I am sure its the same..

Here below is the exact error message that I am receiving when try to link one of myCustom angular component library with my IonicProject. I am using the following command.
_ionic-app-scripts build --prod_

Error message
Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 756:18 in the original .ts file), resolving symbol Component in C:/Monsenso-Source/administration/node_modules/@monsenso/components/node_modules/@angular/core/core.d.ts, resolving symbol LoginComponent in C:/Monsenso-Source/administration/node_modules/@monsenso/components/lib/components/login/login.component.d.ts, resolving symbol LoginComponent in C:/Monsenso-Source/administration/node_modules/@monsenso/components/lib/components/login/login.component.d.ts

It works when its with out --prod

command that works
_ionic-app-scripts build_

any pointer / advice ..

@bobrosoft
Copy link
Contributor Author

bobrosoft commented Oct 11, 2017

@qasimraza1979 sounds as usual AoT issue, not related to that one. Search on internet, there is plenty of info on your issue.

@qasimraza1979
Copy link

qasimraza1979 commented Oct 11, 2017

@bobrosoft i did a lot but haven't got a working solution. This is why after struggling for one month, I asked the question here.

@qasimraza1979
Copy link

qasimraza1979 commented Oct 11, 2017

@bobrosoft
I found the solution and will share here below
placed following two line into the tsConfig.json into the Angular CLI project (in my case my ionic project)

image

saved my life. It was a tough journey for a month now but nailed it ;-)
I placed earlier in a wrong place, which indeed was a mistake.

@bobrosoft
Copy link
Contributor Author

@qasimraza1979 how is that different to my first comment? :)

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

3 participants