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.

Next 2.3.0 Build Errors

See original GitHub issue
Failed to build on /var/folders/ys/lmdgwcfx4vv8w60w68ztzdfm0000gn/T/e219bf14-76f7-492a-b13c-545576e427fb
{ Error: ./~/react-tap-event-plugin/src/injectTapEventPlugin.js
Module not found: Error: Can't resolve 'react-dom/lib/EventPluginHub' in '/Users/tknipfer/Desktop/plate/node_modules/react-tap-event-plugin/src'
resolve 'react-dom/lib/EventPluginHub' in '/Users/tknipfer/Desktop/plate/node_modules/react-tap-event-plugin/src'
  Parsed request is a module
  using description file: /Users/tknipfer/Desktop/plate/node_modules/react-tap-event-plugin/package.json (relative path: ./src)

Running into this when doing a build with the latest next release

Note from maintainers:

Fix

next.config.js

module.exports = {
  webpack: function (c) {
    if (c.resolve.alias) {
      delete c.resolve.alias['react']
      delete c.resolve.alias['react-dom']
    }
    return c
  }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:23
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

21reactions
arunodacommented, May 6, 2017

@chhuang I understand that. Let me see what we can do about this. For now, we can try to remove these aliases using a custom webpack config.

// next.config.js
module.exports = {
  webpack: function (c) {
    if (c.resolve.alias) {
      delete c.resolve.alias['react']
      delete c.resolve.alias['react-dom']
    }
    return c
  }
}

EDIT: I’ve tested ^^ code and it works.

5reactions
juanpujolcommented, May 5, 2017

Getting a similar error when building with 2.3.1 but with different lib.

> Failed to build on /var/folders/01/62l740px2cdf7pt71c398n180000gn/T/2475d29f-f372-48ac-8179-8ef5ecefb86a
{ Error: ./~/react-addons-transition-group/index.js
Module not found: Error: Can't resolve 'react/lib/ReactTransitionGroup' in '/Users/juan/Documents/Beakyn/GSP/_labs/gsp-account-react/node_modules/react-addons-transition-group'
resolve 'react/lib/ReactTransitionGroup' in '/Users/juan/Documents/Beakyn/GSP/_labs/gsp-account-react/node_modules/react-addons-transition-group'
  Parsed request is a module
  using description file: /Users/juan/Documents/Beakyn/GSP/_labs/gsp-account-react/node_modules/react-addons-transition-group/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
...
  • This doesn’t happen on 2.2
  • Removed node_modules and reinstalled.

Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next 2.3.0 Build Errors · Issue #1877 · vercel/next.js - GitHub
Failed at the example-repo@1.0.0 export script 'next export'. npm ERR! Make sure you have the latest version of node.js and npm installed.
Read more >
android10.0.0.2.3.0 build error '-Wshift-overflow=2'
I get this error several time before the compile fails eventually. Hope someone has figure out a workaround. ... Android in 2020-01 as...
Read more >
Docker Compose release notes | Docker Documentation
Fixed compose#9963; Added a build option to run command. ... Fixed a bug to prevent “invalid template” errors on valid environment variable values....
Read more >
Gradle version 2.10 is required. Current version is 4.0.1.
I can't build for android with gradle it says that I'm using the wrong version, where do I change it so it uses...
Read more >
[Solved] Errors Building 2.3.0-alpha0 on Linux - Prusa Forum
I am trying to build the latest alpha on Linux but am stuck on an error that I havent been able to find...
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