# Failed Building production JavaScript and CSS bundles ...\[BABEL\]

**URL:** <https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085>\
**Category:** Support\
**Tags:** deployment\
**Created:** [July 18, 2020, 7:55am UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085 "2020-07-18T07:55:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyndi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cyndi/32/13582_2.png) [@Cyndi](https://answers.netlify.com/u/Cyndi)\
**Post date:** [July 18, 2020, 7:55am UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/1 "2020-07-18T07:55:10Z")

</div>

I need advice to debug deploy [Netlify App](https://app.netlify.com/sites/vigorous-clarke-c0be5c/deploys/5f1263ccc0d61732e4fb0d35)

12:46:16 AM: failed Building production JavaScript and CSS bundles - 0.661s  
12:46:16 AM: error Generating JavaScript bundles failed  
12:46:16 AM: [BABEL] /opt/build/repo/.cache/production-app.js: No “exports” main resolved in /opt/build/repo/node\_modules/@babel/helper-compilation-targets/package.json

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [July 20, 2020, 10:35pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/2 "2020-07-20T22:35:32Z")

</div>

hi there, sorry to be slow to reply. Did you remove your site? i can no longer access your deploy.

---

<div class="post-metadata">

**Author:** ![Cyndi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cyndi/32/13582_2.png) [@Cyndi](https://answers.netlify.com/u/Cyndi)\
**Post date:** [August 19, 2020, 8:48pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/3 "2020-08-19T20:48:51Z")

</div>

No I didn’t remove it. I was having issue deploying it.

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [August 19, 2020, 9:38pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/4 "2020-08-19T21:38:59Z")

</div>

Hmm. I definitely can’t see that deploy log you linked above - can you try deploying again and link either paste the full build log or the link to the deploy log? I have admin access so i should be able to see it…

---

<div class="post-metadata">

**Author:** ![Cyndi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cyndi/32/13582_2.png) [@Cyndi](https://answers.netlify.com/u/Cyndi)\
**Post date:** [August 21, 2020, 6:58pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/5 "2020-08-21T18:58:57Z")

</div>

11:57:01 AM: Build ready to start  
11:57:04 AM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6  
11:57:04 AM: build-image tag: v3.4.1  
11:57:04 AM: buildbot version: fcbc7a79f7372e5995cf02954ef19fc48d20c871  
11:57:06 AM: Fetching cached dependencies  
11:57:06 AM: Failed to fetch cache, continuing with build  
11:57:06 AM: Starting to prepare the repo for build  
11:57:06 AM: No cached dependencies found. Cloning fresh repo  
11:57:06 AM: git clone [GitHub - Nestted/Landing: Nestted App Landing Page](https://github.com/Nestted/Landing)  
11:57:07 AM: Preparing Git Reference refs/heads/master  
11:57:08 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘public’ versus ‘public/’ in the Netlify UI  
11:57:08 AM: Starting build script  
11:57:08 AM: Installing dependencies  
11:57:08 AM: Python version set to 2.7  
11:57:09 AM: v12.18.0 is already installed.  
11:57:10 AM: Now using node v12.18.0 (npm v6.14.4)  
11:57:10 AM: Started restoring cached build plugins  
11:57:10 AM: Finished restoring cached build plugins  
11:57:10 AM: Attempting ruby version 2.7.1, read from environment  
11:57:12 AM: Using ruby version 2.7.1  
11:57:12 AM: Using PHP version 5.6  
11:57:12 AM: 5.2 is already installed.  
11:57:12 AM: Using Swift version 5.2  
11:57:12 AM: Started restoring cached node modules  
11:57:12 AM: Finished restoring cached node modules  
11:57:12 AM: Installing NPM modules using NPM version 6.14.4  
11:57:18 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see [https://github.com/request/request/issues/3142](https://github.com/request/request/issues/3142)  
11:57:20 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported  
11:57:48 AM: \> node-sass@4.14.1 install /opt/build/repo/node\_modules/node-sass  
11:57:48 AM: \> node scripts/install.js  
11:57:48 AM: Downloading binary from [https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-72\_binding.node](https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-72_binding.node)  
11:57:48 AM: Download complete  
11:57:48 AM: Binary saved to /opt/build/repo/node\_modules/node-sass/vendor/linux-x64-72/binding.node  
11:57:49 AM: Caching binary to /opt/buildhome/.npm/node-sass/4.14.1/linux-x64-72\_binding.node  
11:57:49 AM: \> core-js@2.6.11 postinstall /opt/build/repo/node\_modules/core-js  
11:57:49 AM: \> node -e “try{require(‘./postinstall’)}catch(e){}”  
11:57:49 AM: \> core-js-pure@3.6.4 postinstall /opt/build/repo/node\_modules/core-js-pure  
11:57:49 AM: \> node -e “try{require(‘./postinstall’)}catch(e){}”  
11:57:50 AM: \> gatsby-telemetry@1.1.47 postinstall /opt/build/repo/node\_modules/gatsby-telemetry  
11:57:50 AM: \> node src/postinstall.js || true  
11:57:50 AM: \> gatsby-cli@2.8.27 postinstall /opt/build/repo/node\_modules/gatsby/node\_modules/gatsby-cli  
11:57:50 AM: \> node scripts/postinstall.js  
11:57:50 AM: \> gatsby@2.19.7 postinstall /opt/build/repo/node\_modules/gatsby  
11:57:50 AM: \> node scripts/postinstall.js  
11:57:50 AM: \> node-sass@4.14.1 postinstall /opt/build/repo/node\_modules/node-sass  
11:57:50 AM: \> node scripts/build.js  
11:57:51 AM: Binary found at /opt/build/repo/node\_modules/node-sass/vendor/linux-x64-72/binding.node  
11:57:51 AM: Testing binary  
11:57:51 AM: Binary is fine  
11:57:53 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node\_modules/fsevents):  
11:57:53 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})  
11:57:53 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node\_modules/chokidar/node\_modules/fsevents):  
11:57:53 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})  
11:57:53 AM: added 1769 packages from 821 contributors and audited 1841 packages in 39.755s  
11:57:54 AM: 42 packages are looking for funding  
11:57:54 AM: run `npm fund` for details  
11:57:54 AM: found 255 vulnerabilities (245 low, 10 high)  
11:57:54 AM: run `npm audit fix` to fix them, or `npm audit` for details  
11:57:54 AM: NPM modules installed  
11:57:54 AM: Started restoring cached go cache  
11:57:54 AM: Finished restoring cached go cache  
11:57:54 AM: go version go1.14.4 linux/amd64  
11:57:54 AM: go version go1.14.4 linux/amd64  
11:57:54 AM: Installing missing commands  
11:57:54 AM: Verify run directory  
11:57:56 AM: ​  
11:57:56 AM: ┌─────────────────────────────┐  
11:57:56 AM: │ Netlify Build │  
11:57:56 AM: └─────────────────────────────┘  
11:57:56 AM: ​  
11:57:56 AM: ❯ Version  
11:57:56 AM: @netlify/build 3.3.0  
11:57:56 AM: ​  
11:57:56 AM: ❯ Flags  
11:57:56 AM: deployId: 5f4018fdff67d800be0f3166  
11:57:56 AM: mode: buildbot  
11:57:56 AM: ​  
11:57:56 AM: ❯ Current directory  
11:57:56 AM: /opt/build/repo  
11:57:56 AM: ​  
11:57:56 AM: ❯ Config file  
11:57:56 AM: No config file was defined: using default values.  
11:57:56 AM: ​  
11:57:56 AM: ❯ Context  
11:57:56 AM: production  
11:57:56 AM: ​  
11:57:56 AM: ┌───────────────────────────────────┐  
11:57:56 AM: │ 1. Build command from Netlify app │  
11:57:56 AM: └───────────────────────────────────┘  
11:57:56 AM: ​  
11:57:56 AM: $ gatsby build  
11:57:58 AM: success open and validate gatsby-configs - 0.007s  
11:57:58 AM: success load plugins - 0.022s  
11:57:58 AM: success onPreInit - 0.002s  
11:57:58 AM: success delete html and css files from previous builds - 0.009s  
11:57:58 AM: success initialize cache - 0.006s  
11:57:58 AM: success copy gatsby files - 0.028s  
11:57:58 AM: success onPreBootstrap - 0.008s  
11:57:58 AM: success createSchemaCustomization - 0.001s  
11:57:58 AM: success source and transform nodes - 0.016s  
11:57:58 AM: success building schema - 0.182s  
11:57:58 AM: success createPages - 0.000s  
11:57:58 AM: success createPagesStatefully - 0.056s  
11:57:58 AM: success onPreExtractQueries - 0.000s  
11:57:59 AM: success update schema - 0.032s  
11:57:59 AM: success extract queries from components - 0.025s  
11:57:59 AM: success write out requires - 0.006s  
11:57:59 AM: success write out redirect data - 0.002s  
11:57:59 AM: success onPostBootstrap - 0.000s  
11:57:59 AM: ⠀  
11:57:59 AM: info bootstrap finished - 2.819 s  
11:57:59 AM: ⠀  
11:57:59 AM: failed Building production JavaScript and CSS bundles - 0.776s  
11:57:59 AM: error Generating JavaScript bundles failed  
11:57:59 AM: [BABEL] /opt/build/repo/.cache/production-app.js: No “exports” main resolved in /opt/build/repo/node\_modules/@babel/helper-compilation-targets/package.json  
11:57:59 AM: not finished run queries - 0.786s  
11:57:59 AM: ​  
11:57:59 AM: ┌─────────────────────────────┐  
11:57:59 AM: │ “build.command” failed │  
11:57:59 AM: └─────────────────────────────┘  
11:57:59 AM: ​  
11:57:59 AM: Error message  
11:57:59 AM: Command failed with exit code 1: gatsby build  
11:57:59 AM: ​  
11:57:59 AM: Error location  
11:57:59 AM: In Build command from Netlify app:  
11:57:59 AM: gatsby build  
11:57:59 AM: ​  
11:57:59 AM: Resolved config  
11:57:59 AM: build:  
11:57:59 AM: command: gatsby build  
11:57:59 AM: commandOrigin: ui  
11:57:59 AM: publish: /opt/build/repo/public  
11:58:00 AM: Caching artifacts  
11:58:00 AM: Started saving node modules  
11:58:00 AM: Finished saving node modules  
11:58:00 AM: Started saving build plugins  
11:58:00 AM: Finished saving build plugins  
11:58:00 AM: Started saving pip cache  
11:58:00 AM: Finished saving pip cache  
11:58:00 AM: Started saving emacs cask dependencies  
11:58:00 AM: Finished saving emacs cask dependencies  
11:58:00 AM: Started saving maven dependencies  
11:58:00 AM: Finished saving maven dependencies  
11:58:00 AM: Started saving boot dependencies  
11:58:00 AM: Finished saving boot dependencies  
11:58:00 AM: Started saving go dependencies  
11:58:00 AM: Finished saving go dependencies  
11:58:03 AM: Error running command: Build script returned non-zero exit code: 1  
11:58:03 AM: Failing build: Failed to build site  
11:58:03 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1  
11:58:03 AM: Finished processing build request in 59.222680706s

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [August 25, 2020, 9:58pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/6 "2020-08-25T21:58:18Z")

</div>

Hmm, not sure what is happening, but it sounds a lot like this:

> <https://github.com/babel/babel/issues/11216>
>
> \## Bug Report
> \*\*Current Behavior\*\*
> Since an update to node 13.10.1 I have a pr…oblem while building an application with \`babel-loader\`:
> \`\`\`
> Error \[ERR\_PACKAGE\_PATH\_NOT\_EXPORTED\]: No "exports" main resolved in node\_modules/@babel/helper-compilation-targets/package.json
> \`\`\`
> 
> \*\*Expected behavior/code\*\*
> It should build correctly
> 
> \*\*Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)\*\*
> \- Filename: \`babel.config.js\`
> 
> \`\`\`js
> const baseConfig = {
> presets: \[
> \[
> '@babel/preset-env',
> {
> useBuiltIns: 'entry',
> corejs: 3,
> },
> \],
> '@babel/preset-react',
> '@babel/preset-flow',
> '@babel/preset-typescript',
> \],
> plugins: \[
> 'react-hot-loader/babel',
> 'babel-plugin-styled-components',
> \['@babel/plugin-proposal-class-properties', { loose: true }\],
> '@babel/plugin-syntax-dynamic-import',
> isTesting && 'babel-plugin-dynamic-import-node-babel-7',
> \].filter(Boolean),
> };
> 
> module.exports = {
> sourceType: 'unambiguous',
> ...baseConfig,
> plugins: \[
> 'idx',
> '@babel/plugin-syntax-import-meta',
> '@babel/plugin-proposal-json-strings',
> \[
> '@babel/plugin-proposal-decorators',
> {
> legacy: true,
> },
> \],
> '@babel/plugin-proposal-function-sent',
> '@babel/plugin-proposal-export-namespace-from',
> '@babel/plugin-proposal-numeric-separator',
> '@babel/plugin-proposal-optional-chaining',
> '@babel/plugin-proposal-throw-expressions',
> 'babel-plugin-macros',
> \[
> require.resolve('babel-plugin-module-resolver'),
> {
> root: \['./'\],
> alias: {
> 'react-router-dom': './packages/components/Router',
> '@@react-router-dom': './node\_modules/react-router-dom',
> },
> },
> \],
> \],
> env: {
> test: {
> plugins: \[
> ...baseConfig.plugins,
> '@babel/plugin-transform-modules-commonjs',
> \],
> },
> },
> };
> 
> \`\`\`
> 
> \*\*Environment\*\*
> \`\`\`
> System:
> OS: macOS Mojave 10.14.6
> Binaries:
> Node: 13.10.1 - /usr/local/bin/node
> Yarn: 1.22.0 - /usr/local/bin/yarn
> npm: 6.14.2 - /usr/local/bin/npm
> Monorepos:
> Yarn Workspaces: 1.22.0
> npmPackages:
> @babel/core: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-class-properties: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-decorators: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-export-namespace-from: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-function-sent: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-json-strings: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-numeric-separator: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-optional-chaining: ^7.8.3 =\> 7.8.3
> @babel/plugin-proposal-throw-expressions: ^7.8.3 =\> 7.8.3
> @babel/plugin-syntax-dynamic-import: ^7.8.3 =\> 7.8.3
> @babel/plugin-syntax-import-meta: ^7.8.3 =\> 7.8.3
> @babel/preset-env: ^7.8.3 =\> 7.8.3
> @babel/preset-flow: ^7.8.3 =\> 7.8.3
> @babel/preset-react: ^7.8.3 =\> 7.8.3
> @babel/preset-typescript: ^7.8.3 =\> 7.8.3
> babel-eslint: ^10.0.3 =\> 10.0.3
> babel-loader: ^8.0.6 =\> 8.0.6
> babel-plugin-idx: ^2.4.0 =\> 2.4.0
> babel-plugin-lodash: ^3.3.4 =\> 3.3.4
> babel-plugin-macros: ^2.8.0 =\> 2.8.0
> babel-plugin-module-resolver: ^4.0.0 =\> 4.0.0
> babel-plugin-styled-components: ^1.10.7 =\> 1.10.7
> eslint: ^6.8.0 =\> 6.8.0
> jest: ^25.1.0 =\> 25.1.0
> webpack: ^4.41.5 =\> 4.41.5
> \`\`\`
> 
> \*\*Possible Solution\*\*
> \[snowpack\](https://github.com/pikapkg/snowpack) resolved the error like \[this\](https://github.com/pikapkg/snowpack/commit/7de9470a515113ec495472909208c42e59241830). Maybe this could work here too.
> 
> \---
> Edits by @JLHwung 
> 
> \*\*Solution\*\*
> 
> If you hit this issue from search engines, please update \_all\_ \`@babel\` deps to v7.8.7 or above.

Are you using the latest version of Babel and its subpackages? What happens when you try to build locally?

---

<div class="post-metadata">

**Author:** ![Cyndi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cyndi/32/13582_2.png) [@Cyndi](https://answers.netlify.com/u/Cyndi)\
**Post date:** [August 28, 2020, 6:00pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/7 "2020-08-28T18:00:13Z")

</div>

I didn’t create this website. Im just trying to deploy it.

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [August 28, 2020, 6:01pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/8 "2020-08-28T18:01:59Z")

</div>

right, are you trying to deploy it from your local machine? it may be that one of your dependencies is out of date, so you’ll want to get it running locally, and then deploy the working configuration to netlify.

---

<div class="post-metadata">

**Author:** ![Cyndi](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cyndi/32/13582_2.png) [@Cyndi](https://answers.netlify.com/u/Cyndi)\
**Post date:** [August 28, 2020, 6:05pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/9 "2020-08-28T18:05:25Z")

</div>

Yes, How do I do that. Im able to edit though [http://localhost:8000/](http://localhost:8000/) is that what your talking about?

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [August 31, 2020, 5:22pm UTC](https://answers.netlify.com/t/failed-building-production-javascript-and-css-bundles-babel/19085/10 "2020-08-31T17:22:50Z")

</div>

yes - i would suggest you work through our basic troubleshooting guide and get back to us if there are still questions afterward!

[This Support Guide](https://answers.netlify.com/t/common-issue-frequently-encountered-problems-during-builds/213) contains a ton of useful debugging tips that can likely help you.
