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

Schematic creates import with tilde (~) path by default #4463

Closed
janopae opened this issue Jan 8, 2023 · 1 comment · Fixed by #4465
Closed

Schematic creates import with tilde (~) path by default #4463

janopae opened this issue Jan 8, 2023 · 1 comment · Fixed by #4465

Comments

@janopae
Copy link

janopae commented Jan 8, 2023

The first thing I encountered after installing ng-bootstrap was the following error:

./src/styles.scss - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
  ╷
4 │ @import '~bootstrap/scss/bootstrap';
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src/styles.scss 4:1  root stylesheet

After searching about this on the Internet I found that Angular seems to have stopped supporting tilde paths: angular/components@f2ff9e3

According to https://webpack.js.org/loaders/sass-loader/#resolving-import-at-rules, you can just remove the tilde, and it will still work. I removed the tilde in my project, and it works now.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 15.0.4

ng-bootstrap: 14.0.0

Bootstrap: 5.2.3

@maxokorokov
Copy link
Member

Thanks for reporting this, will be fixed with 14.0.1

@maxokorokov maxokorokov added this to the 14.0.1 milestone Jan 9, 2023
maxokorokov added a commit that referenced this issue Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants