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.

with-typescript example build failing with `Error: [BABEL] ..../pages/about.tsx:.overrides is not allowed in preset options`

See original GitHub issue

Examples bug report

Example name

with-typescript

Describe the bug

When I run yarn run build I get an error trace from babel

{ Error: (client) ./pages/about.tsx
Module build failed: Error: [BABEL] /Users/a_user/dev/next.js/examples/with-typescript/pages/about.tsx: .overrides is not allowed in preset options
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/validation/options.js:64:13
    at Array.forEach (<anonymous>)
    at validate (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/validation/options.js:62:21)
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/full.js:242:36
    at cachedFunction (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/caching.js:40:17)
    at loadPresetDescriptor (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/full.js:234:45)
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/full.js:58:19
    at Array.map (<anonymous>)
    at recurseDescriptors (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/full.js:56:36)
    at recurseDescriptors (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/full.js:87:27)
    at loadFullConfig (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/config/full.js:103:6)
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/@babel/core/lib/transform.js:26:33
    at process._tickCallback (internal/process/next_tick.js:61:11)
 @ multi ./pages/about.tsx
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/next/dist/server/build/index.js:141:31
    at runWithDependencies (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/MultiCompiler.js:154:4)
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/async/dist/async.js:1140:9
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/async/dist/async.js:473:16
    at iteratorCallback (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/async/dist/async.js:1064:13)
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/async/dist/async.js:969:16
    at /Users/a_user/dev/next.js/examples/with-typescript/node_modules/async/dist/async.js:1137:13
    at runCompilers (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/MultiCompiler.js:96:47)
    at fn (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/MultiCompiler.js:101:6)
    at compiler.run (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/MultiCompiler.js:150:5)
    at emitRecords.err (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/Compiler.js:265:13)
    at Compiler.emitRecords (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/Compiler.js:371:38)
    at emitAssets.err (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/Compiler.js:258:10)
    at applyPluginsAsyncSeries1.err (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/Compiler.js:364:12)
    at next (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/Users/a_user/dev/next.js/examples/with-typescript/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Check out repo & yarn install in root
  2. Navigate to with-typescript example
  3. yarn install
  4. yarn run build

Minimal Fuss Repro™:

git clone git@github.com:zeit/next.js.git
cd ./next.js 
yarn install
cd ./examples/with-typescript
yarn install
yarn run build

Expected behavior

It should build

System information

  • OS: osx
  • Version of Next.js: 6.0.3

Additional context

I actually found this issue in my own project - it just stopped building. I tried re-running previously passing builds (yarn.locked dependencies) and it now fails. I guess it’s either a dependency that yarn can’t control, or someone has overwritten a release version somewhere

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
timneutkenscommented, May 25, 2018

@lukebarton I’ve just released it as @zeit/next-typescript@1.0.1

9reactions
lkostrowskicommented, Nov 9, 2018

Hi, I just saw the same bug in @zeit/next-typescript": "^1.1.1 -> downgrade to 1.0.1 helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

Babel overrides is not allowed in preset options react native ...
It seems that you have RN 0.56 which used some beta versions of babel. I see you have 2 solutions: 1) Keep RN...
Read more >
next - npm
Custom error handling; Reusing the built-in error page; Custom configuration. Setting a custom build directory; Disabling etag generation ...
Read more >
Building a Static Gatsby-based Website with TypeScript
In this post I am going to work through all of the pieces of a default Gatsby site and try to explain them...
Read more >
How to Build Scalable Architecture for your Next.js Project
All code from this tutorial as a complete package is available in this repository. If you find this... Tagged with nextjs, webdev, ...
Read more >
@netlify/esbuild-darwin-arm64 | Yarn - Package Manager
Fix code generation for export default and /* @__PURE__ */ call (#2203) ... esbuild to fail to parenthesize a function literal because it...
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