-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn on duplicate Sass deps (#16398)
Fixes #13953
- Loading branch information
Showing
10 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Duplicate Sass Dependencies | ||
|
||
#### Why This Error Occurred | ||
|
||
Your project has a direct dependency on both `sass` and `node-sass`, two | ||
different package that both compile Sass files! | ||
|
||
Next.js will only use one of these, so it is suggested you remove one or the | ||
other. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
The `sass` package is a modern implementation of Sass in JavaScript that | ||
supports all the new features and does not require any native dependencies. | ||
|
||
Since `sass` is now the canonical implementation, we suggest removing the older | ||
`node-sass` package, which should speed up your builds and project install time. | ||
|
||
**Via npm** | ||
|
||
```bash | ||
npm uninstall node-sass | ||
``` | ||
|
||
**Via Yarn** | ||
|
||
```bash | ||
yarn remove node-sass | ||
``` | ||
|
||
### Useful Links | ||
|
||
- [`sass` package documentation](https://github.com/sass/dart-sass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!node_modules |
1 change: 1 addition & 0 deletions
1
test/integration/cli/duplicate-sass/node_modules/node-sass/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
test/integration/cli/duplicate-sass/node_modules/node-sass/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
test/integration/cli/duplicate-sass/node_modules/sass/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"node-sass": "*", | ||
"sass": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Home() { | ||
return <p>Hello</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters