rsnext/errors/config-resolve-alias.md
Tim Neutkens 3e51ddb8af
Move syntax formatting to prettier (#7454)
* Run prettier over packages/**/*.js

* Run prettier over packages/**/*.ts

* Run prettier over examples

* Remove tslint

* Run prettier over examples

* Run prettier over all markdown files

* Run prettier over json files
2019-05-29 13:57:26 +02:00

22 lines
619 B
Markdown

# Invalid webpack resolve alias
#### Why This Error Occurred
When overriding `config.resolve.alias` incorrectly in `next.config.js` webpack will throw an error because private-next-pages is not defined.
#### Possible Ways to Fix It
This is not a bug in Next.js, it's related to the user adding a custom webpack(config) config to next.config.js and overriding internals by not applying Next.js' aliases. Solution would be:
```js
webpack(config) {
config.resolve.alias = {
...config.resolve.alias,
// your aliases
}
}
```
### Useful Links
- [Related issue](https://github.com/zeit/next.js/issues/6681)