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

Angule CLI AOT error on referencing a component/service outside app folder #3801

Closed
mmbont0 opened this issue Dec 31, 2016 · 6 comments
Closed

Comments

@mmbont0
Copy link

mmbont0 commented Dec 31, 2016

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 7

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.24
node: 7.3.0
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
My question is here:
http://stackoverflow.com/questions/41405179/angular-cli-aot-compile-error

The log given by the failure.

Normally this include a stack trace and some more information.
ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider rep
lacing the function or lambda with a reference to an exported function, resolving symbol Injectable in C:/ANGULAR PROJECTS/testNgCLI/node_modul
es/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in C:/ANGULAR PROJECTS/testNgCLI/node_modules/@angular/core/src/di/opaque_t
oken.d.ts, resolving symbol OpaqueToken in C:/ANGULAR PROJECTS/testNgCLI/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:\ANGULAR PROJECTS\testNgCLI\app1\src'
@ ./src/main.ts 4:0-74
@ multi main

ERROR in .//@angular/core/src/linker/system_js_ng_module_factory_loader.js
Module not found: Error: Can't resolve 'C:\ANGULAR PROJECTS\testNgCLI\app1\src$$_gendir' in 'C:\ANGULAR PROJECTS\testNgCLI\app1\node_modules@
angular\core\src\linker'
@ ./
/@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102
@ .//@angular/core/src/linker.js
@ ./
/@angular/core/src/core.js
@ ./~/@angular/core/index.js
@ ./src/main.ts
@ multi main

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

@mmbont0 mmbont0 changed the title Angule CLI AOT error on referencing a component/service otuside app folder Angule CLI AOT error on referencing a component/service outside app folder Dec 31, 2016
@mmbont0
Copy link
Author

mmbont0 commented Jan 6, 2017

Still waiting for an answer...:(

@MrTimms
Copy link

MrTimms commented Jan 10, 2017

Ditto on this issue.

@mmbont0
Copy link
Author

mmbont0 commented Jan 14, 2017

#3854

There seems to be a possible clue here,

@Yugloocamai
Copy link

Same issue here

@filipesilva
Copy link
Contributor

We don't currently support multiple app projects. You might not consider files outside of src to be a different project, but as far as the scope of the project is concerned they are.

If you want to add a reusable piece of code, consider adding it as a npm package. You don't need to upload it to npm, you can do npm install ../path/to/project/folder. You'll have to compile it using ngc and expose the AoT metadata though.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 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

4 participants