@material-ui/core/colors/red.js
See original GitHub issue> Build error occurred
/home/stas@i-npz.ru/Документы/portal/node_modules/@material-ui/core/colors/red.js:17
export default red;
^^^^^^
SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:979:16)
at Module._compile (internal/modules/cjs/loader.js:1027:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
Tech | Version |
---|---|
Material-UI | v5.0.0-alpha.18 |
React | 17 |
Browser | |
TypeScript | 4.1.2 |
etc. |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Color - Material UI - MUI
Palette: A palette is a collection of colors, i.e. hues and their shades. MUI provides all colors from the Material Design guidelines. ·...
Read more >material-ui/core/colors/red.js · Issue #23877 - GitHub
import primary from '@material-ui/core/colors/deepOrange';. Replacing this with the following, works just fine:.
Read more >material-ui/core.Color.red JavaScript and Node.js code ...
Best JavaScript code snippets using @material-ui/core.Color.red(Showing top 14 results out of 1,395) · Most used @material-ui/core functions · Popular in ...
Read more >material-ui-colors - npm
Import material ui colors to your js project. ... Start using material-ui-colors in your project by running `npm i material-ui-colors`.
Read more >Material Design Colors, Color Palette | Material UI
Red · 68.5K · 92.9K ; Pink · 34.8K · 58.1K ; Purple · 22.2K · 40.1K ; Deep Purple · 20.3K ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@asibilia it’s expected for v5. See https://next.material-ui.com/guides/migration-v4/#jest-syntaxerror-unexpected-token-export
Sorry for resurrecting a closed thread, but I had this exact same issue and discovered that it had to do with using a default import of a color, e.g.
Replacing this with the following, works just fine:
I haven’t investigated further to figure out what the cause of this issue is, but hopefully it will help someone else who encounters this.