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.

Build error upgrading from 5.0.0-alpha.20 to 5.0.0-alpha.21

See original GitHub issue

After updating the following dependencies, the project fails at build time:

  "@emotion/cache": "11.1.3",
  "@emotion/react": "11.1.4",
  "@emotion/server": "11.0.0",
  "@emotion/styled": "11.0.0",
-  "@material-ui/core": "5.0.0-alpha.20",
-  "@material-ui/icons": "5.0.0-alpha.20",
-  "@material-ui/lab": "5.0.0-alpha.20",
+  "@material-ui/core": "5.0.0-alpha.21",
+  "@material-ui/icons": "5.0.0-alpha.21",
+  "@material-ui/lab": "5.0.0-alpha.21",

Building the app produces the following error. I went through the release changes, but I couldn’t find the reason.

$ next build
Loaded env from /Users/test/mui5-test/.env.production.local
info  - Creating an optimized production build  
info  - Compiled successfully

> Build error occurred
/Users/test/mui5-test/node_modules/@material-ui/core/styles/index.js:1
export { default as adaptV4Theme } from './adaptV4Theme';
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.9Pu4 (/Users/test/mui5-test/.next/server/pages/_app.js:340:18)
    at __webpack_require__ (/Users/test/mui5-test/.next/server/pages/_app.js:23:31)
    at Module.hUgY (/Users/test/mui5-test/.next/server/pages/_app.js:1125:15)
    at __webpack_require__ (/Users/test/mui5-test/.next/server/pages/_app.js:23:31)
    at Object.0 (/Users/test/mui5-test/.next/server/pages/_app.js:106:18)
    at __webpack_require__ (/Users/test/mui5-test/.next/server/pages/_app.js:23:31)
    at /Users/test/mui5-test/.next/server/pages/_app.js:91:18
    at Object.<anonymous> (/Users/test/mui5-test/.next/server/pages/_app.js:94:10)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Expected Behavior 🤔

Steps to Reproduce 🕹

Steps:

Context 🔦

Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: macOS 11.1
  Binaries:
    Node: 12.20.0 - ~/.asdf/installs/nodejs/12.20.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.8 - ~/.asdf/installs/nodejs/12.20.0/bin/npm
  Browsers:
    Chrome: 87.0.4280.88
    Edge: Not Found
    Firefox: 83.0
    Safari: 14.0.2
  npmPackages:
    @emotion/react: 11.1.4 => 11.1.4 
    @emotion/styled: 11.0.0 => 11.0.0 
    @material-ui/core: 5.0.0-alpha.21 => 5.0.0-alpha.21 
    @material-ui/icons: 5.0.0-alpha.21 => 5.0.0-alpha.21 
    @material-ui/lab: 5.0.0-alpha.21 => 5.0.0-alpha.21 
    @material-ui/styled-engine:  5.0.0-alpha.21 
    @material-ui/styles:  5.0.0-alpha.21 
    @material-ui/system:  5.0.0-alpha.21 
    @material-ui/types:  5.1.3 
    @material-ui/unstyled:  5.0.0-alpha.21 
    @material-ui/utils:  5.0.0-alpha.21 
    @types/react: 17.0.0 => 17.0.0 
    react: 17.0.1 => 17.0.1 
    react-dom: 17.0.1 => 17.0.1 
    typescript: 4.1.3 => 4.1.3 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:14
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
oliviertassinaricommented, Jan 3, 2021

When this going to solve?

@usama-asfar As soon as we make a new release. Maybe tomorrow so that developers coming back from holidays can have a working environment with the latest changes.

2reactions
oliviertassinaricommented, Jan 1, 2021

Would the following be enough for fixing it in the next time we release it from a Windows machine?

diff --git a/scripts/copy-files.js b/scripts/copy-files.js
index 146adead04..229b21d7da 100644
--- a/scripts/copy-files.js
+++ b/scripts/copy-files.js
@@ -31,7 +31,7 @@ async function createModulePackages({ from, to }) {
       const packageJson = {
         sideEffects: false,
         module: './index.js',
-        main: path.join('../node', directoryPackage, 'index.js'),
+        main: `../node/${directoryPackage}/index.js`,
         types: './index.d.ts',
       };

In anycase, we round-robin releases, the next release (v5.0.0-alpha.22) won’t happen from a Windows machine, but we still need to fix it for the next time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build error upgrading from 5.0.0-alpha.20 to 5.0.0 ... - GitHub
0-alpha.21", + "@material-ui/lab": "5.0.0-alpha.21",. Building the app produces the following error. I went through the release changes, but I ...
Read more >
node.js - Error with npm install - a pre-gyp error - Stack Overflow
So install python 2.7, then npm install -g node-gyp . That worked for me and got rid of all the other errors install...
Read more >
constant field values - JDA 5.0.0-alpha.10 javadoc
net.dv8tion.jda.api.events.emote.update.EmoteUpdateNameEvent. Modifier and Type. Constant Field. Value. public static final String · IDENTIFIER. "name" · net.
Read more >
@mui/lab | Yarn - Package Manager
@mui/lab. This package hosts the incubator components that are not yet ready to move to core . Installation. Install the package in your...
Read more >
Mattermost self-hosted changelog
Mattermost v7.5.0 contains a medium severity level security fix. Upgrading to ... Added logic to package product version of Boards with production builds....
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