question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scss imports are causing errors on stackblitz

See original GitHub issue

Whenever we import an scss file with the filename (including the extension) we do not have any issues in local setup with the Angular CLI.

@import './wathever.scss'

However, using this on Stackblitz gives the following error:

Error: ENOENT: No such file or directory., '/dev/null'

After changing the import to the following we get ride of the error on stackblitz

@import './wathever'

See https://stackblitz.com/edit/angular-import-scss?file=src%2F_test.scss for a reproduction of the issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

2reactions
seanlandsmancommented, Feb 3, 2020

@tobi-or-not-tobi I encountered this too and found it was actually an incorrect path. Looking at your example the same thing is true - if you change styles.scss to have this:

@import './_test.scss';

then it works as expected.

For anyone else encountering this just make sure that all imports point to valid/correct resources.

1reaction
vidhya03commented, Oct 21, 2019

its occurring for me also any clue

Read more comments on GitHub >

github_iconTop Results From Across the Web

StackBlitz Can't Locate Existing Angular SCSS File
I am moving an app to Angular 7 app StackBlitz that was developed in VSCode. The angular.json has been adjusted to work with...
Read more >
Not working explicit CSS imports - StackBlitz
some condition - in my real case it is in. react hook an has a lot of logic. const darkModeOn = true;. const...
Read more >
Static Asset Handling - Vite
Importing a static asset will return the resolved public URL when it is served ... can cause runtime errors if build.target does not...
Read more >
48 answers on StackOverflow to the most popular Angular ...
Importing lodash into angular2 + typescript application; How to detect a route change in ... *ngIf and *ngFor on same element causing error....
Read more >
Sass and CSS Import Performance in Angular - Cory Rylan
Angular components styles have a useful CSS encapsulation mechanism ... To do this, I am importing the buttons Sass file. ... .btn.error {...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found