https://github.com/icflorescu/next8-babel-issue
A repo demonstrating issue #6273 in Next.js
https://github.com/icflorescu/next8-babel-issue
Last synced: 5 months ago
JSON representation
A repo demonstrating issue #6273 in Next.js
- Host: GitHub
- URL: https://github.com/icflorescu/next8-babel-issue
- Owner: icflorescu
- Created: 2019-02-13T14:18:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T14:18:35.000Z (almost 7 years ago)
- Last Synced: 2025-01-28T04:34:08.532Z (12 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Next.js 8.0.1 – babel not compiling properly
A simple test repo to reproduce issue [#6273](https://github.com/zeit/next.js/issues/6273) in Next.js `8.0.1`.
`npm run dev`/`yarn dev` will start a Next.js application with a custom express server.
Accessing [http://localhost:3000](http://localhost:3000) will result in a 500 Internal Server Error and the following stack trace:
```
(...)next8-babel-issue/node_modules/@babel/runtime-corejs2/helpers/esm/typeof.js:1
(function (exports, require, module, __filename, __dirname) { import _Symbol$iterator from "../../core-js/symbol/iterator";
^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
(...)
```
Changing `presets: ['next/babel']` to `presets: [['next/babel', { 'transform-runtime': { useESModules: false } }]]` solves the issue.