hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 25 forks source link

Can't resolve '@emotion/react' in '/opt/build/repo/js/node_modules/gatsby-plugin-material-ui' while update gatsby-plugin-material-ui 3.0.1 -> 4.0.3 #79

Closed LucaHermann closed 2 years ago

LucaHermann commented 2 years ago

Hi, my Netlify build can't finish because i got an error Can't resolve '@emotion/react' in '/opt/build/repo/js/node_modules/gatsby-plugin-material-ui' when i try to update from 3.0.1 to 4.0.3 the "problem" is that in local on the branch created by renovate (bot) the build pass successfully. If someone got a clue about fix this i got @emotion in my node_modules so maybe npm i @emotion/react

7:08:47 PM: success open and validate gatsby-configs, load plugins - 0.800s
7:08:47 PM: success onPreInit - 0.005s
7:08:47 PM: success initialize cache - 0.060s
7:08:47 PM: success copy gatsby files - 0.091s
7:08:49 PM: success Compiling Gatsby Functions - 1.431s
7:08:49 PM: success onPreBootstrap - 1.441s
7:08:49 PM: success createSchemaCustomization - 0.000s
7:08:49 PM: success Checking for changed pages - 0.000s
7:08:49 PM: success source and transform nodes - 0.628s
7:08:51 PM: success building schema - 1.597s
7:08:51 PM: success createPages - 0.000s
7:08:51 PM: success createPagesStatefully - 0.413s
7:08:51 PM: info Total nodes: 109, SitePage nodes: 4 (use --verbose for breakdown)
7:08:51 PM: success Checking for changed pages - 0.000s
7:08:52 PM: success update schema - 0.271s
7:08:52 PM: success onPreExtractQueries - 0.000s
7:08:54 PM: success extract queries from components - 1.815s
7:08:54 PM: success write out redirect data - 0.008s
7:08:54 PM: success Build manifest and related icons - 0.274s
7:08:54 PM: success onPostBootstrap - 0.276s
7:08:54 PM: info bootstrap finished - 9.817s
7:08:54 PM: success run static queries - 0.020s - 1/1 50.49/s
7:08:54 PM: success run page queries - 0.005s - 4/4 729.99/s
7:08:54 PM: success write out requires - 0.070s
7:10:01 PM: failed Building production JavaScript and CSS bundles - 67.292s
7:10:01 PM: error Generating JavaScript bundles failed
7:10:01 PM: Can't resolve '@emotion/react' in '/opt/build/repo/js/node_modules/gatsby-plugin-material-ui'
7:10:01 PM: If you're trying to use a package make sure that '@emotion/react' is installed. If you're trying to use a local file make sure that the path is correct.
7:10:02 PM: ​
7:10:02 PM: ────────────────────────────────────────────────────────────────
7:10:02 PM:   "build.command" failed                                        
7:10:02 PM: ────────────────────────────────────────────────────────────────
7:10:02 PM: ​
7:10:02 PM:   Error message
7:10:02 PM:   Command failed with exit code 1: gatsby build
7:10:02 PM: ​
7:10:02 PM:   Error location
7:10:02 PM:   In Build command from Netlify app:
7:10:02 PM:   gatsby build
7:10:02 PM: ​
7:10:02 PM:   Resolved config
7:10:02 PM:   build:
7:10:02 PM:     base: /opt/build/repo/js
7:10:02 PM:     command: gatsby build
7:10:02 PM:     commandOrigin: ui
7:10:02 PM:     environment:
7:10:02 PM:       - REVIEW_ID
7:10:02 PM:     publish: /opt/build/repo/js/public
7:10:02 PM:     publishOrigin: ui
7:10:02 PM:   redirects:
7:10:02 PM:     - from: /dd
7:10:02 PM:       to: /
7:10:02 PM:   redirectsOrigin: config
7:10:02 PM: Caching artifacts
7:10:02 PM: Started saving node modules
7:10:02 PM: Finished saving node modules
7:10:02 PM: Started saving build plugins
7:10:02 PM: Finished saving build plugins
7:10:02 PM: Started saving pip cache
7:10:02 PM: Finished saving pip cache
7:10:02 PM: Started saving emacs cask dependencies
7:10:02 PM: Finished saving emacs cask dependencies
7:10:02 PM: Started saving maven dependencies
7:10:02 PM: Finished saving maven dependencies
7:10:02 PM: Started saving boot dependencies
7:10:02 PM: Finished saving boot dependencies
7:10:02 PM: Started saving rust rustup cache
7:10:02 PM: Finished saving rust rustup cache
7:10:02 PM: Started saving go dependencies
7:10:02 PM: Finished saving go dependencies
7:10:06 PM: Cached ruby version 2.7.1
7:10:06 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:10:06 PM: Creating deploy upload records
7:10:06 PM: Failing build: Failed to build site
7:10:06 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
7:10:06 PM: Finished processing build request in 3m31.565477713s
hupe1980 commented 2 years ago

@emotion/react is a peerDependency. You have to install it yourself