gatsby: Minified exception occurred; use the non-minified dev environment
Description
Gatsby Build is failing, while gatsby develop is working.
Steps to reproduce
set GATSBY_ENV=development && npm run build-css && gatsby build
Expected result
It should have succeed in Gatbsy Build
Actual result
`$ set GATSBY_ENV=development && npm run build-css && gatsby build
braun-ca@1.0.0 build-css C:\StaticGenerators\Projects\fun\MT-MW-Braun-CA postcss ./assets/css/tailwind.css -o ./assets/css/index.css
success open and validate gatsby-config — 0.012 s
success load plugins — 0.319 s
success onPreInit — 1.434 s
success delete html and css files from previous builds — 1.315 s
success initialize cache — 0.273 s
success copy gatsby files — 0.188 s
success onPreBootstrap — 0.001 s
⠁ :: starting to fetch data from Bazaarvoice ::
⠂ source and transform nodes
:: fetching Bazaarvoice data is completed ::
⠄ source and transform nodesStarting to fetch data from Contentful
Fetching default locale
⠄ source and transform nodesdefault local is : en-CA
⠄ source and transform nodescontentTypes fetched 43
Updated entries 0
Deleted entries 0
Updated assets 0
Deleted assets 0
Fetch Contentful data: 2166.855ms
success source and transform nodes — 9.187 s
success building schema — 2.322 s
success createPages — 0.780 s
success createPagesStatefully — 0.048 s
success onPreExtractQueries — 0.026 s
success update schema — 1.712 s
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
warning Using the global graphql tag is deprecated, and will not be supported in v3.
Import it instead like: import { graphql } from ‘gatsby’ in file:
C:/StaticGenerators/Projects/fun/MT-MW-Braun-CA/src/utils/graphqlHelper.js
success extract queries from components — 0.822 s
success run graphql queries — 5.440 s — 119/119 21.88 queries/second
success write out page data — 0.028 s
success write out redirect data — 0.002 s
success onPostBootstrap — 0.023 s
info bootstrap finished - 29.406 s
success Building production JavaScript and CSS bundles — 44.608 s ⠂ Building static HTML for pages — 100/230 27.63 pages/second(node:6048) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
error Building static HTML for pages failed
See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
31 | var error; 32 | if (format === undefined) {
33 | error = new Error( | ^ 34 | 'Minified exception occurred; use the non-minified dev environment ’ + 35 | ‘for the full error message and additional helpful warnings.’ 36 | );
WebpackError: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful wa rnings.
-
invariant.js:33 invariant [lib]/[invariant]/invariant.js:33:1
-
index.js:590 [lib]/[@reach]/router/es/index.js:590:1
-
react.production.min.js:18 V [lib]/[react]/cjs/react.production.min.js:18:48
-
react.production.min.js:16 S [lib]/[react]/cjs/react.production.min.js:16:210
-
react.production.min.js:18 W [lib]/[react]/cjs/react.production.min.js:18:388
-
react.production.min.js:19 Object.map [lib]/[react]/cjs/react.production.min.js:19:67
-
index.js:211 RouterImpl.render [lib]/[@reach]/router/es/index.js:211:1
-
react-dom-server.node.production.min.js:28 d [lib]/[react-dom]/cjs/react-dom-server.node.production.min.js:28:207
-
react-dom-server.node.production.min.js:28 ya [lib]/[react-dom]/cjs/react-dom-server.node.production.min.js:28:493
-
react-dom-server.node.production.min.js:33 a.render [lib]/[react-dom]/cjs/react-dom-server.node.production.min.js:33:46
-
react-dom-server.node.production.min.js:32 a.read [lib]/[react-dom]/cjs/react-dom-server.node.production.min.js:32:246
-
react-dom-server.node.production.min.js:43 renderToString [lib]/[react-dom]/cjs/react-dom-server.node.production.min.js:43:1
-
static-entry.js:145 Module…/.cache/static-entry.js.webpack_exports.default lib/.cache/static-entry.js:145:16
error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
Environment
"resolutions": {
"graphql": "0.13.2"
},
"author": "Mindtree",
"license": "ISC",
"dependencies": {
"autoprefixer": "^8.5.0",
"axios": "0.16.1",
"circular-json": "0.3.1",
"classnames": "^2.2.5",
"file-saver": "^1.3.8",
"fs": "0.0.1-security",
"fs-extra": "3.0.1",
"gatsby": "^2.0.0-beta.96",
"gatsby-image": "^1.0.55",
"gatsby-link": "^2.0.0-beta.20",
"gatsby-plugin-canonical-urls": "^1.0.18",
"gatsby-plugin-google-analytics": "^2.0.0-beta.4",
"gatsby-plugin-google-tagmanager": "^1.0.19",
"gatsby-plugin-i18n": "^0.4.2",
"gatsby-plugin-manifest": "^2.0.2-beta.5",
"gatsby-plugin-offline": "^2.0.0-beta.9",
"gatsby-plugin-purify-css": "^2.2.1",
"gatsby-plugin-react-helmet": "^3.0.0-beta.4",
"gatsby-plugin-robots-txt": "^1.3.0",
"gatsby-plugin-sharp": "^2.0.0-beta.7",
"gatsby-plugin-sitemap": "^2.0.0-beta.3",
"gatsby-source-contentful": "^2.0.1-beta.15",
"gatsby-transformer-remark": "^2.1.1-beta.6",
"gatsby-transformer-sharp": "^2.1.1-beta.6",
"intl": "^1.2.5",
"json-query": "2.2.2",
"jsonwebtoken": "^8.3.0",
"lodash": "^4.17.10",
"lodash.debounce": "4.0.8",
"mobx": "^4.3.0",
"mobx-react": "^5.1.2",
"picturefill": "^3.0.2",
"postcss-import": "^11.1.0",
"qs-stringify": "^1.1.0",
"query-string": "^6.1.0",
"react": "^16.4.1",
"react-autosuggest": "9.0.1",
"react-dom": "^16.4.1",
"react-helmet": "^5.2.0",
"react-idle-timer": "^4.0.7",
"react-image-magnify": "^2.7.0",
"react-intl": "^2.4.0",
"react-slick": "^0.23.1",
"swiftype": "0.3.1",
"validatorjs": "^3.14.2"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"babel-jest": "^22.4.4",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-react-app": "^3.0.3",
"enzyme": "^3.0.0",
"enzyme-adapter-react-15": "^1.0.0",
"enzyme-to-json": "^3.0.1",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.8.1",
"jest": "^21.2.1",
"postcss": "^7.0.1",
"postcss-cli": "^6.0.0",
"prettier": "1.12.1",
"purgecss": "^0.21.0",
"react-test-renderer": "^15.5.4",
"tailwindcss": "^0.5.1"
}
File contents (if changed)
gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (5 by maintainers)
I am still experiencing the issue, why is it closed?
@KyleAMathews I don’t think --no-uglify is working now - due to the change to terser seems likely?
I really need to build with ‘the non-minified environment’ at the moment; a quite obscure error in a router <Redirect /> which works perfectly in develop.
Please advise – thanks. All latest Gatsby/-cli.
p.s. tried your original idea to modify node_modules/…/webpack.config.js – didn’t work either
Still an issue, 2022