Skip to content

Scss build fails because of shim.ngstyle.js not foundΒ #15453

@Kaspazza

Description

@Kaspazza

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

This bug was not present in previous versions.

Description

Sometimes (I can't say what triggers it but for sure when there were changes in scss file) while building a project (with --aot flag, I didn't have checked either the bug occurs without it) (scss file).shim.ngstyle.js is not to be found and after serving again no errors occur.

A clear and concise description of the problem...

πŸ”¬ Minimal Reproduction

1.make changes in scss file
2. ng s --aot
On some repetition, it will happen.

πŸ”₯ Exception or Error




ERROR in ./src/app/modules/patients/components/patient-details/patient-evaluation/goals/goals-content/goals-content.component.scss.shim.ngstyle.js
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: ENOENT: no such file or directory, open 'C:\Users\user\Desktop\projekt\portal\src\app\modules\patients\components\patient-details\patient-evaluation\goals\goals-content\goals-content.component.scss.shim.ngstyle.js'
    at Object.openSync (fs.js:438:3)
    at Object.readFileSync (fs.js:343:35)
    at Storage.provideSync (C:\Users\user\Desktop\projekt\portal\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)
    at CachedInputFileSystem.readFileSync (C:\Users\user\Desktop\projekt\portal\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\user\Desktop\projekt\portal\node_modules\@ngtools\webpack\src\webpack-input-host.js:35:51)
    at Observable._trySubscribe (C:\Users\user\Desktop\projekt\portal\node_modules\@ngtools\webpack\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Users\user\Desktop\projekt\portal\node_modules\@ngtools\webpack\node_modules\rxjs\internal\Observable.js:30:22)
    at SyncDelegateHost._doSyncCall (C:\Users\user\Desktop\projekt\portal\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:22:20)
    at SyncDelegateHost.read (C:\Users\user\Desktop\projekt\portal\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:49:21)
    at WebpackCompilerHost.readFileBuffer (C:\Users\user\Desktop\projekt\portal\node_modules\@ngtools\webpack\src\compiler_host.js:147:44)
    at VirtualFileSystemDecorator.readFile (C:\Users\user\Desktop\projekt\portal\node_modules\@ngtools\webpack\src\virtual_file_system_decorator.js:42:54)
    at processResource (C:\Users\user\Desktop\projekt\portal\node_modules\loader-runner\lib\LoaderRunner.js:202:11)
    at iteratePitchingLoaders (C:\Users\user\Desktop\projekt\portal\node_modules\loader-runner\lib\LoaderRunner.js:158:10)
    at iteratePitchingLoaders (C:\Users\user\Desktop\projekt\portal\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at C:\Users\user\Desktop\projekt\portal\node_modules\loader-runner\lib\LoaderRunner.js:176:18
    at loadLoader (C:\Users\user\Desktop\projekt\portal\node_modules\loader-runner\lib\loadLoader.js:47:3)
i ο½’wdmο½£: Failed to compile.

🌍 Your Environment




Angular CLI: 8.3.0
Node: 10.15.3
OS: win32 x64
Angular: 8.2.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.802.2
@angular-devkit/build-angular     0.802.2
@angular-devkit/build-optimizer   0.802.2
@angular-devkit/build-webpack     0.802.2
@angular-devkit/core              8.2.2
@angular-devkit/schematics        8.3.0
@angular/cli                      8.3.0
@ngtools/webpack                  8.2.2
@schematics/angular               8.3.0
@schematics/update                0.803.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.39.2

Anything else relevant?

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions