https://github.com/jhnns/linaria-bug-repo
https://github.com/jhnns/linaria-bug-repo
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jhnns/linaria-bug-repo
- Owner: jhnns
- Created: 2022-08-24T13:40:41.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-13T17:10:24.000Z (over 2 years ago)
- Last Synced: 2025-01-24T12:13:41.612Z (5 months ago)
- Language: JavaScript
- Size: 175 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
This repo demonstrates a linaria/babel bug. When running `npm run build`, it will throw:
```
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/jhnns/dev/jhnns/linaria-bug-repo/src/main.js: /Users/jhnns/dev/jhnns/linaria-bug-repo/src/mobx.js: Exporting local "b", which is not declared.
7 | }
8 |
> 9 | export { a, b };
| ^
at File.buildCodeFrameError (/Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/core/lib/transformation/file/file.js:249:12)
at NodePath.buildCodeFrameError (/Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/traverse/lib/path/index.js:145:21)
at getLocalMetadata (/Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:318:22)
at /Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:347:33
at Array.forEach ()
at /Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:344:33
at Array.forEach ()
at getLocalExportMetadata (/Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:331:27)
at getModuleMetadata (/Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:122:21)
at normalizeModuleAndLoadMetadata (/Users/jhnns/dev/jhnns/linaria-bug-repo/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js:58:7)
```## Steps to reproduce
- Using Node v16.13.1 (but I don't think the Node version is the problem)
- `npm i`
- `npm run build`