Build ERROR opt/build/repo/.cache/loader.js: Missing class properties transform

PLEASE help us help you by writing a good post!

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
    https://60458abd35012400073438dd--zealous-neumann-40b351.netlify.app/

  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.

  • Build problems? Link or paste the FULL build log & build settings screenshot

The better the post - the faster the answer.

My last successful deployment was in March and I have not done anything until today. I update just the SEO component with the meta tag, the title & the description. And that is an ERROR that I do not know how to solve.

I even went back to the previous successful deployment to deploy it but I saw the same error message. I also npm install --save-dev @babel/plugin-proposal-class-properties but nothing works.

It works on my local.

package.json

{

β€œname”: β€œgatsby-starter-hello-world”,
β€œprivate”: true,
β€œdescription”: β€œA simplified bare-bones starter for Gatsby”,
β€œversion”: β€œ0.1.0”,
β€œlicense”: β€œ0BSD”,
β€œscripts”: {
β€œbuild”: β€œnpm run build”,
β€œdevelop”: β€œgatsby develop”,
β€œformat”: β€œprettier --write "**/*.{js,jsx,ts,tsx,json,md}"”,
β€œstart”: β€œnpm run develop”,
β€œserve”: β€œgatsby serve”,
β€œclean”: β€œgatsby clean”,
β€œtest”: β€œecho "Write tests! β†’ Link not found - Rebrandly” && exit 1"
},
β€œdependencies”: {
β€œ@mdx-js/mdx”: β€œ^1.6.22”,
β€œ@mdx-js/react”: β€œ^1.6.22”,
β€œ@styled-icons/fa-solid”: β€œ^10.32.0”,
β€œbabel-plugin-styled-components”: β€œ^1.12.0”,
β€œdotenv”: β€œ^8.6.0”,
β€œgatsby”: β€œ^2.31.1”,
β€œgatsby-background-image”: β€œ^1.3.1”,
β€œgatsby-image”: β€œ^2.7.0”,
β€œgatsby-plugin-google-gtag”: β€œ^3.0.0”,
β€œgatsby-plugin-manifest”: β€œ^2.8.0”,
β€œgatsby-plugin-offline”: β€œ^3.6.0”,
β€œgatsby-plugin-preact”: β€œ^4.6.0”,
β€œgatsby-plugin-react-helmet”: β€œ^3.6.0”,
β€œgatsby-plugin-sass”: β€œ^3.0.0”,
β€œgatsby-plugin-sharp”: β€œ^2.10.0”,
β€œgatsby-plugin-sitemap”: β€œ^2.11.0”,
β€œgatsby-plugin-styled-components”: β€œ^3.9.0”,
β€œgatsby-plugin-webfonts”: β€œ^1.1.4”,
β€œgatsby-source-contentful”: β€œ^4.6.0”,
β€œgatsby-source-filesystem”: β€œ^2.11.0”,
β€œgatsby-transformer-remark”: β€œ^2.16.1”,
β€œgatsby-transformer-sharp”: β€œ^2.8.0”,
β€œpreact”: β€œ^10.5.12”,
β€œpreact-render-to-string”: β€œ^5.1.12”,
β€œprop-types”: β€œ^15.7.2”,
β€œreact”: β€œ^16.12.0”,
β€œreact-dom”: β€œ^16.12.0”,
β€œreact-helmet”: β€œ^6.1.0”,
β€œreact-icons”: β€œ^4.1.0”,
β€œreact-instantsearch-dom”: β€œ^6.8.2”,
β€œsass”: β€œ^1.32.4”,
β€œstyled-components”: β€œ^5.2.1”
},
β€œdevDependencies”: {
β€œ@babel/plugin-proposal-class-properties”: β€œ^7.13.0”,
β€œprettier”: β€œ2.1.2”
},
β€œrepository”: {
β€œtype”: β€œgit”,
β€œurl”: β€œGitHub - gatsbyjs/gatsby-starter-hello-world: Starter with the bare essentials needed for a Gatsby site”
},
β€œbugs”: {
β€œurl”: β€œIssues Β· gatsbyjs/gatsby Β· GitHub”
}
}

Please help me solve this issue.

Thank you.

Hey there, @robot :wave:

Thanks so much for reaching out. It looks like this thread has been a bit quiet this past week. Are you still encountering this error? If you are, can you share any additional debugging steps you have taken since posting? Thank you :slight_smile:

Thank you for the reply. I have been waiting for someone to help me since I still have this issue.

I can not provide you more debug steps because I have no ideas what is going on. All I know is it was working without any issues and I did not make any changes in the code except I updated the meta stages info.

I hope you can help me resolve this issue.

Thank you.

hi there robot, could you link or paste a full deplog log for us please?

11:42:28 PM: Build ready to start
11:42:29 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
11:42:29 PM: build-image tag: v3.7.6
11:42:29 PM: buildbot version: a48b8d4d77f610116266be793835039290f679d3
11:42:30 PM: Fetching cached dependencies
11:42:30 PM: Failed to fetch cache, continuing with build
11:42:30 PM: Starting to prepare the repo for build
11:42:30 PM: No cached dependencies found. Cloning fresh repo
11:42:30 PM: git clone https://github.com/krit-tech/gatsby-Pho-Thai-Express-restaurant
11:42:31 PM: Preparing Git Reference refs/heads/main
11:42:32 PM: Parsing package.json dependencies
11:42:33 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
11:42:33 PM: Starting build script
11:42:33 PM: Installing dependencies
11:42:33 PM: Python version set to 2.7
11:42:34 PM: Downloading and installing node v12.18.2...
11:42:34 PM: Downloading https://nodejs.org/dist/v12.18.2/node-v12.18.2-linux-x64.tar.xz...
11:42:35 PM: Computing checksum with sha256sum
11:42:35 PM: Checksums matched!
11:42:37 PM: Now using node v12.18.2 (npm v6.14.5)
11:42:37 PM: Started restoring cached build plugins
11:42:37 PM: Finished restoring cached build plugins
11:42:37 PM: Attempting ruby version 2.7.1, read from environment
11:42:39 PM: Using ruby version 2.7.1
11:42:39 PM: Using PHP version 5.6
11:42:39 PM: Started restoring cached yarn cache
11:42:39 PM: Finished restoring cached yarn cache
11:42:39 PM: Installing yarn at version 1.22.4
11:42:39 PM: Installing Yarn!
11:42:39 PM: > Downloading tarball...
11:42:39 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.oanuh8SaAZ
11:42:39 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
11:42:39 PM:                                  Dload  Upload   Total   Spent    Left  Speed
11:42:39 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
11:42:39 PM: 100    79  100    79    0     0    441      0 --:--:-- --:--:-- --:--:--   443
11:42:39 PM: 100    93  100    93    0     0    196      0 --:--:-- --:--:-- --:--:--   196
11:42:40 PM: 100   625  100   625    0     0    884      0 --:--:-- --:--:-- --:--:--   884
11:42:40 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
11:42:40 PM: 100 1215k  100 1215k    0     0  1190k      0  0:00:01  0:00:01 --:--:-- 5308k
11:42:40 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.oanuh8SaAZ.asc
11:42:40 PM: 100    83  100    83    0     0   1159      0 --:--:-- --:--:-- --:--:--  1159
11:42:40 PM: 100    97  100    97    0     0    972      0 --:--:-- --:--:-- --:--:--   972
11:42:40 PM: 100   629  100   629    0     0   4991      0 --:--:-- --:--:-- --:--:--  4991
11:42:40 PM: 100  1028  100  1028    0     0   7492      0 --:--:-- --:--:-- --:--:--  7492
11:42:40 PM: > Verifying integrity...
11:42:40 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
11:42:40 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
11:42:40 PM: gpg: WARNING: This key is not certified with a trusted signature!
11:42:40 PM: gpg:          There is no indication that the signature belongs to the owner.
11:42:40 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
11:42:40 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
11:42:40 PM: > GPG signature looks good
11:42:40 PM: > Extracting to ~/.yarn...
11:42:40 PM: > Adding to $PATH...
11:42:41 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
11:42:41 PM: No yarn workspaces detected
11:42:41 PM: Started restoring cached node modules
11:42:41 PM: Finished restoring cached node modules
11:42:41 PM: Installing NPM modules using Yarn version 1.22.4
11:42:42 PM: yarn install v1.22.4
11:42:42 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
11:42:42 PM: [1/4] Resolving packages...
11:42:46 PM: warning gatsby-image@2.11.0: This package has been deprecated in favor of gatsby-plugin-image. The migration guide can be found here: https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/.
11:42:46 PM: warning gatsby-plugin-offline > workbox-build > @hapi/joi@15.1.1: Switch to 'npm install joi'
11:42:49 PM: warning gatsby-transformer-remark > remark > unified > @types/vfile > @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
11:42:50 PM: [2/4] Fetching packages...
11:42:57 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader".
11:43:24 PM: info fsevents@2.1.3: The platform "linux" is incompatible with this module.
11:43:24 PM: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
11:43:24 PM: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
11:43:24 PM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
11:43:24 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
11:43:24 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
11:43:24 PM: [3/4] Linking dependencies...
11:43:24 PM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
11:43:24 PM: warning "gatsby > eslint-plugin-graphql > graphql-config > @endemolshinegroup/cosmiconfig-typescript-loader > ts-node@9.0.0" has unmet peer dependency "typescript@>=2.7".
11:43:24 PM: warning " > @babel/plugin-proposal-class-properties@7.13.0" has unmet peer dependency "@babel/core@^7.0.0-0".
11:43:24 PM: warning " > gatsby-plugin-google-gtag@3.6.0" has incorrect peer dependency "gatsby@^3.0.0-next.0".
11:43:24 PM: warning "gatsby-plugin-preact > @prefresh/webpack@1.1.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
11:43:24 PM: warning "gatsby-plugin-sass > sass-loader@10.2.0" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
11:43:24 PM: warning " > gatsby-source-contentful@4.6.4" has unmet peer dependency "sharp@^0.26.0".
11:43:24 PM: warning "react-instantsearch-dom > react-instantsearch-core@6.11.0" has unmet peer dependency "algoliasearch@>= 3.1 < 5".
11:43:24 PM: warning "react-instantsearch-dom > algoliasearch-helper@3.4.4" has unmet peer dependency "algoliasearch@>= 3.1 < 5".
11:43:24 PM: warning " > styled-components@5.3.0" has unmet peer dependency "react-is@>= 16.8.0".
11:43:48 PM: [4/4] Building fresh packages...
11:43:55 PM: success Saved lockfile.
11:43:55 PM: Done in 73.76s.
11:43:55 PM: NPM modules installed using Yarn
11:43:56 PM: Started restoring cached go cache
11:43:56 PM: Finished restoring cached go cache
11:43:56 PM: go version go1.14.4 linux/amd64
11:43:56 PM: go version go1.14.4 linux/amd64
11:43:56 PM: Installing missing commands
11:43:56 PM: Verify run directory
11:43:57 PM: ​
11:43:57 PM: ────────────────────────────────────────────────────────────────
11:43:57 PM:   Netlify Build                                                 
11:43:57 PM: ────────────────────────────────────────────────────────────────
11:43:57 PM: ​
11:43:57 PM: ❯ Version
11:43:57 PM:   @netlify/build 11.22.0
11:43:57 PM: ​
11:43:57 PM: ❯ Flags
11:43:57 PM:   deployId: 60adc3a49b150f000870cd58
11:43:57 PM: ​
11:43:57 PM: ❯ Current directory
11:43:57 PM:   /opt/build/repo
11:43:57 PM: ​
11:43:57 PM: ❯ Config file
11:43:57 PM:   No config file was defined: using default values.
11:43:57 PM: ​
11:43:57 PM: ❯ Context
11:43:57 PM:   production
11:43:57 PM: ​
11:43:57 PM: ❯ Installing plugins
11:43:57 PM:    - @netlify/plugin-sitemap@0.8.1
11:43:57 PM:    - netlify-plugin-submit-sitemap@0.2.3
11:44:01 PM: ​
11:44:01 PM: ❯ Loading plugins
11:44:01 PM:    - @netlify/plugin-sitemap@0.8.1 from Netlify app
11:44:01 PM:    - netlify-plugin-submit-sitemap@0.2.3 from Netlify app
11:44:01 PM: ​
11:44:01 PM: ────────────────────────────────────────────────────────────────
11:44:01 PM:   1. Build command from Netlify app                             
11:44:01 PM: ────────────────────────────────────────────────────────────────
11:44:01 PM: ​
11:44:01 PM: $ yarn build
11:44:01 PM: yarn run v1.22.4
11:44:01 PM: $ gatsby build
11:44:05 PM: success open and validate gatsby-configs - 0.064s
11:44:06 PM: warning Plugin gatsby-plugin-google-gtag is not compatible with your gatsby version 2.32.13 - It requires gatsby@^3.0.0-next.0
11:44:06 PM: success load plugins - 1.235s
11:44:06 PM: success onPreInit - 0.038s
11:44:06 PM: success delete html and css files from previous builds - 0.003s
11:44:06 PM: success initialize cache - 0.005s
11:44:06 PM: success copy gatsby files - 0.054s
11:44:06 PM: warning Browserslist: caniuse-lite is outdated. Please run:
11:44:06 PM: npx browserslist@latest --update-db
11:44:06 PM: Why you should do it regularly:
11:44:06 PM: https://github.com/browserslist/browserslist#browsers-data-updating
11:44:07 PM: success onPreBootstrap - 0.426s
11:44:07 PM: success createSchemaCustomization - 0.014s
11:44:07 PM: success Contentful: Sync all items - 0.062s - 82/1000 16040.45/s
11:44:07 PM: success Contentful: Fetch data (u7tt2tym6t4h-master) - 0.248s
11:44:07 PM: info Updated entries 63
11:44:07 PM: info Deleted entries 0
11:44:07 PM: info Updated assets 19
11:44:07 PM: info Deleted assets 0
11:44:07 PM: success Contentful: Process data (u7tt2tym6t4h-master) - 0.041s
11:44:07 PM: info Creating 18 Contentful image nodes
11:44:07 PM: info Creating 4 Contentful chefRec nodes
11:44:07 PM: info Creating 3 Contentful features nodes
11:44:07 PM: info Creating 5 Contentful review nodes
11:44:07 PM: info Creating 32 Contentful menu nodes
11:44:07 PM: info Creating 1 Contentful  about us nodes
11:44:07 PM: info Creating 19 Contentful asset nodes
11:44:07 PM: success Contentful: Create nodes (u7tt2tym6t4h-master) - 0.118s
11:44:07 PM: success Checking for changed pages - 0.000s
11:44:07 PM: success source and transform nodes - 0.598s
11:44:08 PM: warning Thank you for trying the beta version of the `gatsbyImageData` API. Please provide feedback and report any issues at: https://github.com/gatsbyjs/gatsby/discussions/27950
11:44:08 PM: success building schema - 0.608s
11:44:08 PM: info Total nodes: 213, SitePage nodes: 1 (use --verbose for breakdown)
11:44:08 PM: success createPages - 0.001s
11:44:08 PM: success Checking for changed pages - 0.000s
11:44:08 PM: success createPagesStatefully - 0.106s
11:44:08 PM: success update schema - 0.040s
11:44:08 PM: success onPreExtractQueries - 0.002s
11:44:10 PM: success extract queries from components - 1.557s
11:44:10 PM: success write out redirect data - 0.001s
11:44:10 PM: success onPostBootstrap - 0.001s
11:44:10 PM: info bootstrap finished - 8.183s
11:44:10 PM: success run static queries - 0.291s - 8/8 27.49/s
11:44:10 PM: success run page queries - 0.007s - 6/6 919.91/s
11:44:10 PM: success write out requires - 0.004s
11:44:39 PM: failed Building production JavaScript and CSS bundles - 29.505s
11:44:39 PM: error Generating JavaScript bundles failed
11:44:39 PM: /opt/build/repo/.cache/loader.js: Missing class properties transform.
11:44:39 PM:   101 |   }
11:44:39 PM:   102 |
11:44:39 PM: > 103 |   inFlightNetworkRequests = new Map()
11:44:39 PM:       |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11:44:39 PM:   104 |
11:44:39 PM:   105 |   memoizedGet(url) {
11:44:39 PM:   106 |     let inFlightPromise = this.inFlightNetworkRequests.get(url)
11:44:40 PM: error Command failed with exit code 1.
11:44:40 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
11:44:40 PM: ​
11:44:40 PM: ────────────────────────────────────────────────────────────────
11:44:40 PM:   "build.command" failed                                        
11:44:40 PM: ────────────────────────────────────────────────────────────────
11:44:40 PM: ​
11:44:40 PM:   Error message
11:44:40 PM:   Command failed with exit code 1: yarn build
11:44:40 PM: ​
11:44:40 PM:   Error location
11:44:40 PM:   In Build command from Netlify app:
11:44:40 PM:   yarn build
11:44:40 PM: ​
11:44:40 PM:   Resolved config
11:44:40 PM:   build:
11:44:40 PM:     command: yarn build
11:44:40 PM:     commandOrigin: ui
11:44:40 PM:     environment:
11:44:40 PM:       - CONTENTFUL_ACCESS_TOKEN
11:44:40 PM:       - NODE_VERSION
11:44:40 PM:     publish: /opt/build/repo/public
11:44:40 PM:   functions:
11:44:40 PM:     '*': {}
11:44:40 PM:   plugins:
11:44:40 PM:     - inputs: {}
11:44:40 PM:       origin: ui
11:44:40 PM:       package: '@netlify/plugin-sitemap'
11:44:40 PM:     - inputs: {}
11:44:40 PM:       origin: ui
11:44:40 PM:       package: netlify-plugin-submit-sitemap
11:44:40 PM: Caching artifacts
11:44:40 PM: Started saving node modules
11:44:40 PM: Finished saving node modules
11:44:40 PM: Started saving build plugins
11:44:40 PM: Finished saving build plugins
11:44:40 PM: Started saving yarn cache
11:44:40 PM: Finished saving yarn cache
11:44:40 PM: Started saving pip cache
11:44:40 PM: Finished saving pip cache
11:44:40 PM: Started saving emacs cask dependencies
11:44:40 PM: Finished saving emacs cask dependencies
11:44:40 PM: Started saving maven dependencies
11:44:40 PM: Finished saving maven dependencies
11:44:40 PM: Started saving boot dependencies
11:44:40 PM: Finished saving boot dependencies
11:44:40 PM: Started saving rust rustup cache
11:44:40 PM: Finished saving rust rustup cache
11:44:40 PM: Started saving go dependencies
11:44:40 PM: Finished saving go dependencies
11:44:43 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:44:43 PM: Creating deploy upload records
11:44:43 PM: Failing build: Failed to build site
11:44:43 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
11:44:43 PM: Finished processing build request in 2m13.781559718s

hmm, interesting. Seems like maybe something is not right with your build cache.

does the error also occur when you try β€œclear cache and redeploy”? my hunch is that some dependency maybe got updated behind the scenes, and now the cache does not contain the information that is needed. Will you try the idea i just mentioned and let us know?

I did it. Same error!

4:44:41 PM: Build ready to start
4:44:43 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
4:44:43 PM: build-image tag: v3.7.6
4:44:43 PM: buildbot version: 00e794c8abfdf634e411d5afc169b41bd6a2f9f3
4:44:43 PM: Building without cache
4:44:43 PM: Starting to prepare the repo for build
4:44:43 PM: No cached dependencies found. Cloning fresh repo
4:44:43 PM: git clone https://github.com/krit-tech/gatsby-Pho-Thai-Express-restaurant
4:44:44 PM: Preparing Git Reference refs/heads/main
4:44:45 PM: Parsing package.json dependencies
4:44:45 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
4:44:46 PM: Starting build script
4:44:46 PM: Installing dependencies
4:44:46 PM: Python version set to 2.7
4:44:47 PM: Downloading and installing node v12.18.2...
4:44:47 PM: Downloading https://nodejs.org/dist/v12.18.2/node-v12.18.2-linux-x64.tar.xz...
4:44:47 PM: Computing checksum with sha256sum
4:44:48 PM: Checksums matched!
4:44:50 PM: Now using node v12.18.2 (npm v6.14.5)
4:44:50 PM: Started restoring cached build plugins
4:44:50 PM: Finished restoring cached build plugins
4:44:50 PM: Attempting ruby version 2.7.1, read from environment
4:44:51 PM: Using ruby version 2.7.1
4:44:52 PM: Using PHP version 5.6
4:44:52 PM: Started restoring cached yarn cache
4:44:52 PM: Finished restoring cached yarn cache
4:44:52 PM: Installing yarn at version 1.22.4
4:44:52 PM: Installing Yarn!
4:44:52 PM: > Downloading tarball...
4:44:52 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.oVxQWgvMWf
4:44:52 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
4:44:52 PM:                                  Dload  Upload   Total   Spent    Left  Speed
4:44:52 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
4:44:52 PM: 100    79  100    79    0     0    463      0 --:--:-- --:--:-- --:--:--   464
4:44:52 PM: 100    93  100    93    0     0    191      0 --:--:-- --:--:-- --:--:--   191
4:44:52 PM: 100   625  100   625    0     0    842      0 --:--:-- --:--:-- --:--:--   842
4:44:53 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
4:44:53 PM: 100 1215k  100 1215k    0     0  1100k      0  0:00:01  0:00:01 --:--:-- 4535k
4:44:53 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.oVxQWgvMWf.asc
4:44:53 PM: 100    83  100    83    0     0   1216      0 --:--:-- --:--:-- --:--:--  1216
4:44:53 PM: 100    97  100    97    0     0    983      0 --:--:-- --:--:-- --:--:--   983
4:44:53 PM: 100   629  100   629    0     0   5009      0 --:--:-- --:--:-- --:--:--  5009
4:44:53 PM: 100  1028  100  1028    0     0   7534      0 --:--:-- --:--:-- --:--:--  7534
4:44:53 PM: > Verifying integrity...
4:44:53 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
4:44:53 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
4:44:53 PM: gpg: WARNING: This key is not certified with a trusted signature!
4:44:53 PM: gpg:          There is no indication that the signature belongs to the owner.
4:44:53 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
4:44:53 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
4:44:53 PM: > GPG signature looks good
4:44:53 PM: > Extracting to ~/.yarn...
4:44:53 PM: > Adding to $PATH...
4:44:53 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
4:44:54 PM: No yarn workspaces detected
4:44:54 PM: Started restoring cached node modules
4:44:54 PM: Finished restoring cached node modules
4:44:54 PM: Installing NPM modules using Yarn version 1.22.4
4:44:54 PM: yarn install v1.22.4
4:44:54 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
4:44:54 PM: [1/4] Resolving packages...
4:44:59 PM: warning gatsby-image@2.11.0: This package has been deprecated in favor of gatsby-plugin-image. The migration guide can be found here: https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/.
4:44:59 PM: warning gatsby-plugin-offline > workbox-build > @hapi/joi@15.1.1: Switch to 'npm install joi'
4:45:01 PM: warning gatsby-plugin-sharp > imagemin-mozjpeg > mozjpeg > bin-build > tempfile > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
4:45:03 PM: warning gatsby-transformer-remark > remark > unified > @types/vfile > @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
4:45:04 PM: [2/4] Fetching packages...
4:45:10 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader".
4:45:35 PM: info fsevents@2.1.3: The platform "linux" is incompatible with this module.
4:45:35 PM: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
4:45:35 PM: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
4:45:35 PM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
4:45:35 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
4:45:35 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
4:45:35 PM: [3/4] Linking dependencies...
4:45:35 PM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
4:45:35 PM: warning "gatsby > eslint-plugin-graphql > graphql-config > @endemolshinegroup/cosmiconfig-typescript-loader > ts-node@9.0.0" has unmet peer dependency "typescript@>=2.7".
4:45:35 PM: warning " > @babel/plugin-proposal-class-properties@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
4:45:35 PM: warning " > gatsby-plugin-google-gtag@3.7.1" has incorrect peer dependency "gatsby@^3.0.0-next.0".
4:45:35 PM: warning "gatsby-plugin-preact > @prefresh/webpack@1.1.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
4:45:35 PM: warning "gatsby-plugin-sass > sass-loader@10.2.0" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
4:45:35 PM: warning " > gatsby-source-contentful@4.6.4" has unmet peer dependency "sharp@^0.26.0".
4:45:35 PM: warning "react-instantsearch-dom > algoliasearch-helper@3.4.5" has unmet peer dependency "algoliasearch@>= 3.1 < 5".
4:45:35 PM: warning "react-instantsearch-dom > react-instantsearch-core@6.11.1" has unmet peer dependency "algoliasearch@>= 3.1 < 5".
4:45:35 PM: warning " > styled-components@5.3.0" has unmet peer dependency "react-is@>= 16.8.0".
4:46:01 PM: [4/4] Building fresh packages...
4:46:07 PM: success Saved lockfile.
4:46:07 PM: Done in 73.07s.
4:46:08 PM: NPM modules installed using Yarn
4:46:08 PM: Started restoring cached go cache
4:46:08 PM: Finished restoring cached go cache
4:46:08 PM: go version go1.14.4 linux/amd64
4:46:08 PM: go version go1.14.4 linux/amd64
4:46:08 PM: Installing missing commands
4:46:08 PM: Verify run directory
4:46:08 PM: ​
4:46:08 PM: ────────────────────────────────────────────────────────────────
4:46:08 PM:   Netlify Build                                                 
4:46:08 PM: ────────────────────────────────────────────────────────────────
4:46:08 PM: ​
4:46:08 PM: ❯ Version
4:46:08 PM:   @netlify/build 12.1.0
4:46:08 PM: ​
4:46:08 PM: ❯ Flags
4:46:08 PM:   deployId: 60c3cb39bee8ba13ac38c893
4:46:08 PM: ​
4:46:08 PM: ❯ Current directory
4:46:08 PM:   /opt/build/repo
4:46:08 PM: ​
4:46:08 PM: ❯ Config file
4:46:08 PM:   No config file was defined: using default values.
4:46:08 PM: ​
4:46:08 PM: ❯ Context
4:46:08 PM:   production
4:46:09 PM: ​
4:46:09 PM: ❯ Installing plugins
4:46:09 PM:    - @netlify/plugin-sitemap@0.8.1
4:46:09 PM:    - netlify-plugin-submit-sitemap@0.2.3
4:46:12 PM: ​
4:46:12 PM: ❯ Loading plugins
4:46:12 PM:    - @netlify/plugin-sitemap@0.8.1 from Netlify app
4:46:12 PM:    - netlify-plugin-submit-sitemap@0.2.3 from Netlify app
4:46:13 PM: ​
4:46:13 PM: ────────────────────────────────────────────────────────────────
4:46:13 PM:   1. Build command from Netlify app                             
4:46:13 PM: ────────────────────────────────────────────────────────────────
4:46:13 PM: ​
4:46:13 PM: $ yarn build
4:46:13 PM: yarn run v1.22.4
4:46:13 PM: $ gatsby build
4:46:16 PM: success open and validate gatsby-configs - 0.061s
4:46:17 PM: warning Plugin gatsby-plugin-google-gtag is not compatible with your gatsby version 2.32.13 - It requires gatsby@^3.0.0-next.0
4:46:17 PM: success load plugins - 1.283s
4:46:17 PM: success onPreInit - 0.040s
4:46:17 PM: success delete html and css files from previous builds - 0.004s
4:46:17 PM: success initialize cache - 0.006s
4:46:17 PM: success copy gatsby files - 0.062s
4:46:18 PM: warning Browserslist: caniuse-lite is outdated. Please run:
4:46:18 PM: npx browserslist@latest --update-db
4:46:18 PM: Why you should do it regularly:
4:46:18 PM: https://github.com/browserslist/browserslist#browsers-data-updating
4:46:18 PM: success onPreBootstrap - 0.419s
4:46:18 PM: success createSchemaCustomization - 0.009s
4:46:19 PM: success Contentful: Sync all items - 0.158s - 82/1000 6315.77/s
4:46:19 PM: success Contentful: Fetch data (u7tt2tym6t4h-master) - 0.698s
4:46:19 PM: info Updated entries 63
4:46:19 PM: info Deleted entries 0
4:46:19 PM: info Updated assets 19
4:46:19 PM: info Deleted assets 0
4:46:19 PM: success Contentful: Process data (u7tt2tym6t4h-master) - 0.028s
4:46:19 PM: info Creating 18 Contentful image nodes
4:46:19 PM: info Creating 4 Contentful chefRec nodes
4:46:19 PM: info Creating 3 Contentful features nodes
4:46:19 PM: info Creating 5 Contentful review nodes
4:46:19 PM: info Creating 32 Contentful menu nodes
4:46:19 PM: info Creating 1 Contentful  about us nodes
4:46:19 PM: info Creating 19 Contentful asset nodes
4:46:19 PM: success Contentful: Create nodes (u7tt2tym6t4h-master) - 0.088s
4:46:19 PM: success Checking for changed pages - 0.000s
4:46:19 PM: success source and transform nodes - 0.986s
4:46:19 PM: warning Thank you for trying the beta version of the `gatsbyImageData` API. Please provide feedback and report any issues at: https://github.com/gatsbyjs/gatsby/discussions/27950
4:46:20 PM: success building schema - 0.697s
4:46:20 PM: info Total nodes: 213, SitePage nodes: 1 (use --verbose for breakdown)
4:46:20 PM: success createPages - 0.001s
4:46:20 PM: success Checking for changed pages - 0.000s
4:46:20 PM: success createPagesStatefully - 0.098s
4:46:20 PM: success update schema - 0.025s
4:46:20 PM: success onPreExtractQueries - 0.001s
4:46:21 PM: success extract queries from components - 1.579s
4:46:21 PM: success write out redirect data - 0.001s
4:46:21 PM: success onPostBootstrap - 0.001s
4:46:21 PM: info bootstrap finished - 8.572s
4:46:22 PM: success run static queries - 0.719s - 8/8 11.13/s
4:46:22 PM: success run page queries - 0.007s - 6/6 838.94/s
4:46:22 PM: success write out requires - 0.003s
4:46:52 PM: failed Building production JavaScript and CSS bundles - 29.649s
4:46:52 PM: error Generating JavaScript bundles failed
4:46:52 PM: /opt/build/repo/.cache/loader.js: Missing class properties transform.
4:46:52 PM:   101 |   }
4:46:52 PM:   102 |
4:46:52 PM: > 103 |   inFlightNetworkRequests = new Map()
4:46:52 PM:       |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4:46:52 PM:   104 |
4:46:52 PM:   105 |   memoizedGet(url) {
4:46:52 PM:   106 |     let inFlightPromise = this.inFlightNetworkRequests.get(url)
4:46:52 PM: error Command failed with exit code 1.
4:46:52 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
4:46:52 PM: ​
4:46:52 PM: ────────────────────────────────────────────────────────────────
4:46:52 PM:   "build.command" failed                                        
4:46:52 PM: ────────────────────────────────────────────────────────────────
4:46:52 PM: ​
4:46:52 PM:   Error message
4:46:52 PM:   Command failed with exit code 1: yarn build
4:46:52 PM: ​
4:46:52 PM:   Error location
4:46:52 PM:   In Build command from Netlify app:
4:46:52 PM:   yarn build
4:46:52 PM: ​
4:46:52 PM:   Resolved config
4:46:52 PM:   build:
4:46:52 PM:     command: yarn build
4:46:52 PM:     commandOrigin: ui
4:46:52 PM:     environment:
4:46:52 PM:       - CONTENTFUL_ACCESS_TOKEN
4:46:52 PM:       - NODE_VERSION
4:46:52 PM:     publish: /opt/build/repo/public
4:46:52 PM:   functions:
4:46:52 PM:     '*': {}
4:46:52 PM:   plugins:
4:46:52 PM:     - inputs: {}
4:46:52 PM:       origin: ui
4:46:52 PM:       package: '@netlify/plugin-sitemap'
4:46:52 PM:     - inputs: {}
4:46:52 PM:       origin: ui
4:46:52 PM:       package: netlify-plugin-submit-sitemap
4:46:52 PM: Caching artifacts
4:46:52 PM: Started saving node modules
4:46:52 PM: Finished saving node modules
4:46:52 PM: Started saving build plugins
4:46:52 PM: Finished saving build plugins
4:46:52 PM: Started saving yarn cache
4:46:52 PM: Finished saving yarn cache
4:46:52 PM: Started saving pip cache
4:46:52 PM: Finished saving pip cache
4:46:52 PM: Started saving emacs cask dependencies
4:46:53 PM: Finished saving emacs cask dependencies
4:46:53 PM: Started saving maven dependencies
4:46:53 PM: Finished saving maven dependencies
4:46:53 PM: Started saving boot dependencies
4:46:53 PM: Finished saving boot dependencies
4:46:53 PM: Started saving rust rustup cache
4:46:53 PM: Finished saving rust rustup cache
4:46:53 PM: Started saving go dependencies
4:46:53 PM: Finished saving go dependencies
4:46:56 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:46:56 PM: Creating deploy upload records
4:46:56 PM: Failing build: Failed to build site
4:46:56 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
4:46:56 PM: Finished processing build request in 2m13.11647424s

Hi, @robot. This StackOverflow post might be helpful:

Have you tried adding that package as a dependency?

This is my package.json.

{
  "name": "gatsby-starter-hello-world",
  "private": true,
  "description": "A simplified bare-bones starter for Gatsby",
  "version": "0.1.0",
  "license": "0BSD",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
  },
  "dependencies": {
    "@mdx-js/mdx": "^1.6.22",
    "@mdx-js/react": "^1.6.22",
    "@styled-icons/fa-solid": "^10.32.0",
    "babel-plugin-styled-components": "^1.12.0",
    "dotenv": "^8.6.0",
    "gatsby": "^2.31.1",
    "gatsby-background-image": "^1.3.1",
    "gatsby-image": "^2.7.0",
    "gatsby-plugin-google-gtag": "^3.0.0",
    "gatsby-plugin-manifest": "^2.8.0",
    "gatsby-plugin-offline": "^3.6.0",
    "gatsby-plugin-preact": "^4.6.0",
    "gatsby-plugin-react-helmet": "^3.6.0",
    "gatsby-plugin-sass": "^3.0.0",
    "gatsby-plugin-sharp": "^2.10.0",
    "gatsby-plugin-sitemap": "^2.11.0",
    "gatsby-plugin-styled-components": "^3.9.0",
    "gatsby-plugin-webfonts": "^1.1.4",
    "gatsby-source-contentful": "^4.6.0",
    "gatsby-source-filesystem": "^2.11.0",
    "gatsby-transformer-remark": "^2.16.1",
    "gatsby-transformer-sharp": "^2.8.0",
    "preact": "^10.5.12",
    "preact-render-to-string": "^5.1.12",
    "prop-types": "^15.7.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-helmet": "^6.1.0",
    "react-icons": "^4.1.0",
    "react-instantsearch-dom": "^6.8.2",
    "sass": "^1.32.4",
    "styled-components": "^5.2.1"
  },
  "devDependencies": {
    "@babel/plugin-proposal-class-properties": "^7.13.0",
    "prettier": "2.1.2"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

Hi, @robot. Yes, that package isn’t present in you package.json. Have you tried adding it?

Hi! I’m not sure if this is the correct place to speak on this but I’m having a very similar issue to this.

I posted my problem in the above post. Just found this very post we’re on.

I also had a successful deployment back in very early May and decided to pick the project back up yesterday and have mysterious build problems. Rolling back everything to the last successful deployment also does not work for me. Even though the code should be exactly the same. I cleared the build cache and everything.

The first error is also a dependency error. It should be handled by package-lock.json but I manually installed all the missing dependencies that caused the builds to error anyways. After fixing those, it then threw various errors regarding typescript loaders. Also similar to @ robot’s problem it seems. At least regarding the loader.

Not sure what to do about my case either and I thought it would help to provide some information regarding this thread too. You suggested adding the package to package.json which I had done through my debug steps and that only lead to further issues. Everything works locally.

Hi, @NoahBres. While the issues are similar I don’t think they are similar enough to troubleshoot both in a single topic.

Both issues involve the use of npm and reference missing dependencies but that is the only similarity. The static site generators used and the dependency which are missing are completely different so I do think keeping the two topics split is best.

1 Like

Most definitely! Apologies if I’m contributing to some noise here. Not expecting to troubleshoot both in this one topic for sure! Just thought it would be helpful to point it out if these errors did happen to be linked if it were a bug on your end! Because it does seem like something changed with the build image in May that affected us both (because of the previously successful builds no longer working).