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 writes wrong scss file to app.component.ngFactory #2938

Closed
simonh1000 opened this issue Oct 28, 2016 · 5 comments
Closed

AOT writes wrong scss file to app.component.ngFactory #2938

simonh1000 opened this issue Oct 28, 2016 · 5 comments
Labels
needs: repro steps We cannot reproduce the issue with the information given

Comments

@simonh1000
Copy link

Please provide us with the following information:

OS?

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

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.18
node: 6.3.1
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng build --prod --aot
I'm ending up with
import * as import14 from '../../app/app.component.scss';
in app.module.ngfactory.ts whereas it would seem it should be
import * as import14 from './app.component.scss';

The log given by the failure.

Normally this include a stack trace and some more information.

ERROR in ./src/aot/app/app.component.ngfactory.ts
Module build failed: Error: /Users/simon/code/wp_af2015/wp-content/themes/af2016/afapp/src/aot/app/app.component.ngfactory.ts (21,27): Cannot find module '../../app/app.component.scss'.)
at _transpile (/Users/simon/code/wp_af2015/wp-content/themes/af2016/afapp/node_modules/@ngtools/webpack/src/loader.js:101:19)
at /Users/simon/code/wp_af2015/wp-content/themes/af2016/afapp/node_modules/@ngtools/webpack/src/loader.js:125:26
at process._tickCallback (internal/process/next_tick.js:103:7)
@ ./src/aot/app/app.module.ngfactory.ts 41:0-54
@ ./src/main.ts
@ multi main

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

@filipesilva filipesilva added the needs: repro steps We cannot reproduce the issue with the information given label Nov 3, 2016
@filipesilva
Copy link
Contributor

Can you provide me some repro steps so that I can look into this?

@daniele-zurico
Copy link

daniele-zurico commented Nov 21, 2016

same here.
@filipesilva This is my repo project: https://github.com/daniele-zurico/webpack-aot

@BrainCrumbz
Copy link

It might be worth noting that a (very very) similar behaviour has already been flagged in these two angular issues:

  1. AOT generated scss.shim imported path && scss brackets bugs angular#12539
  2. AOT: SCSS files are imported in GenDir but linking is wrong angular#11688

@filipesilva
Copy link
Contributor

Closing as answered by @BrainCrumbz, thanks for finding the right issues!

@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: repro steps We cannot reproduce the issue with the information given
Projects
None yet
Development

No branches or pull requests

4 participants