x)- [ X] bug report -> please search issues before submitting
- [ ] feature request
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 /home/patrikx3/Projects/patrikx3/corifeus/corifeus-app-web-pages/node_modules/corifeus-web/node_modules/@angular/core/core.d.ts, resolving symbol 傻f in /home/patrikx3/Projects/patrikx3/corifeus/corifeus-app-web-pages/node_modules/corifeus-web/node_modules/@angular/core/core.d.ts, resolving symbol 傻f in /home/patrikx3/Projects/patrikx3/corifeus/corifeus-app-web-pages/node_modules/corifeus-web/node_modules/@angular/core/core.d.ts
Any npm link failures.
Given already.
Works.
Simple, just broken.
same issue!
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 /Users/toan/Sites/loopcms/backend/node_modules/@angular/core/core.d.ts, resolving symbol 傻f in /Users/toan/Sites/loopcms/backend/node_modules/@angular/core/core.d.ts, resolving symbol 傻f in /Users/toan/Sites/loopcms/backend/node_modules/@angular/core/core.d.ts
The issue is that the npm linked packages contain their own copy of the node_modules folder, with their own copies of referenced packages (i.e. @angular/core etc.).
This is perhaps mainly an issue with the typescript compiler itself, and not so much @angular/cli or @angular/compiler. See also: https://github.com/Microsoft/TypeScript/issues/6496
A workaround is, to put this in the tsconfig.json compilerOptions element:
"paths": {
"@angular/common": [
"../node_modules/@angular/common"
],
"@angular/compiler": [
"../node_modules/@angular/compiler"
],
"@angular/core": [
"../node_modules/@angular/core"
],
"@angular/forms": [
"../node_modules/@angular/forms"
],
"@angular/platform-browser": [
"../node_modules/@angular/platform-browser"
],
"@angular/platform-browser-dynamic": [
"../node_modules/@angular/platform-browser-dynamic"
],
"@angular/router": [
"../node_modules/@angular/router"
],
"@angular/http": [
"../node_modules/@angular/http"
]
},
This will tell the compiler to use the main projects copy of these packages and not the nested ones.
However, this requires a change in the projects config that is not necessary when you don't link a package, so this is just a workaround.
It would be best, if the ngc / tsc would ignore nested node_modules when there is an explicit installed module on the top level for that.
@gingters and others - I have had good results working around all this. Lots of details in this repo:
https://github.com/OasisDigital/many-to-many-angular
Example of applying the technique you mentioned:
https://github.com/OasisDigital/many-to-many-angular/blob/master/application/admin/tsconfig.json#L11
@kylecordes thanks for sharing this, looks great!
Duplicate of https://github.com/angular/angular-cli/issues/3854, the answer there is very similar to @gingters's one.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
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 /Users/toan/Sites/loopcms/backend/node_modules/@angular/core/core.d.ts, resolving symbol 傻f in /Users/toan/Sites/loopcms/backend/node_modules/@angular/core/core.d.ts, resolving symbol 傻f in /Users/toan/Sites/loopcms/backend/node_modules/@angular/core/core.d.ts