Missing class properties transform
See original GitHub issueDescription
The build command crashes after updating to v3.7:
yarn run v1.19.1
$ gatsby build --verbose
verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "build"
verbose loading local command from: /tlp-website/node_modules/gatsby/dist/commands/build.js
verbose running command: build
success open and validate gatsby-configs - 2.571s
success load plugins - 5.280s
success onPreInit - 0.050s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution, we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 2.482s
success copy gatsby files - 0.121s
verbose Attaching functions to development server
success Compiling Gatsby Functions - 0.615s
success onPreBootstrap - 1.559s
success createSchemaCustomization - 0.180s
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 0 changed pages
success Checking for changed pages - 0.004s
success source and transform nodes - 0.710s
success building schema - 0.636s
success createPages - 23.034s
verbose PageCreator: Creating 4 pages from {MarkdownRemark.frontmatter__slug}.tsx
success createPagesStatefully - 0.099s
info Total nodes: 8769, SitePage nodes: 8696 (use --verbose for breakdown)
verbose Number of node types: 9. Nodes per type: Directory: 3, File: 15, GraphQLSource: 1, ImageSharp: 3, MarkdownRemark: 4, Site: 1, SiteBuildMetadata: 1, SitePage: 8696,
SitePlugin: 45
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 8696 changed pages
success Checking for changed pages - 0.004s
success Cleaning up stale page-data - 0.271s
success update schema - 15.253s
success onPreExtractQueries - 0.001s
success extract queries from components - 0.950s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.075s
success onPostBootstrap - 0.079s
info bootstrap finished - 62.397s
success run static queries - 0.389s - 2/2 5.15/s
success run page queries - 5.268s - 8696/8696 1650.84/s
success write out requires - 0.033s
failed Building production JavaScript and CSS bundles - 84.844s
ERROR #98123 WEBPACK
Generating JavaScript bundles failed
/tlp-website/.cache/loader.js: Missing class properties transform.
101 | }
102 |
> 103 | inFlightNetworkRequests = new Map()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 |
105 | memoizedGet(url) {
106 | let inFlightPromise = this.inFlightNetworkRequests.get(url)
File: .cache/loader.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Steps to reproduce
I updated from "gatsby": "^3.6.2" => "gatsby": "^3.7.0" and ran into this issue. Not sure what is causing it yet.
I see that there’s been some updates to configs in this release, and I do export a config:
// gatsby-node
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
resolve: {
alias: {
path: require.resolve("path-browserify"),
},
fallback: {
fs: false,
},
},
})
}
The crash does however persist if I remove this config.
Expected result
Gatsby should build without issues.
Actual result
The build crashes with what looks like a babel issue? Not 100% sure what’s causing it yet.
Environment
System:
OS: macOS 11.4
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
Yarn: 1.22.10 - ~/tlp-website/node_modules/.bin/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
Languages:
Python: 3.7.1 - /Users/jonathan/anaconda3/bin/python
Browsers:
Safari: 14.1.1
npmPackages:
gatsby: ^3.7.0 => 3.7.0
gatsby-image: ^3.7.0 => 3.7.0
gatsby-plugin-advanced-sitemap: ^2.0.0 => 2.0.0
gatsby-plugin-codegen: ^1.3.0-next => 1.3.0-next
gatsby-plugin-google-tagmanager: ^3.7.0 => 3.7.0
gatsby-plugin-manifest: ^3.7.0 => 3.7.0
gatsby-plugin-material-ui: ^3.0.1 => 3.0.1
gatsby-plugin-offline: ^4.7.0 => 4.7.0
gatsby-plugin-react-helmet: ^4.7.0 => 4.7.0
gatsby-plugin-sharp: ^3.7.0 => 3.7.0
gatsby-plugin-webfonts: ^2.1.0 => 2.1.0
gatsby-remark-autolink-headers: ^4.4.0 => 4.4.0
gatsby-source-filesystem: ^3.7.0 => 3.7.0
gatsby-source-graphql: ^3.7.0 => 3.7.0
gatsby-transformer-remark: ^4.4.0 => 4.4.0
gatsby-transformer-sharp: ^3.7.0 => 3.7.0
No flags in my gatsby-config
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:20 (6 by maintainers)
Top Results From Across the Web
Error: Missing class properties transform
The fix in my case was defining 'transform-class-properties' plugin in the options attribute of my webpack.config.js, i'm using babel V6
Read more >Compile error 'Missing class properties transform' when ...
Summary Expo projects using the @expo/next-adapter fail to compile when using the Next server on versions >=10.0.2 Environment Expo CLI ...
Read more >Low-Tech Fix for "Missing class properties transform" Errors?
A lot of coders are encountering “Missing class properties transform” errors, as some ES7 syntax is not yet supported by Babel. E.g.:
Read more >JavaScript : Error: Missing class properties transform - YouTube
JavaScript : Error: Missing class properties transform [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript : Error: ...
Read more >Support
I found similar issue in different topic (Build ERROR opt/build/repo/.cache/loader.js: Missing class properties transform) and I've already ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For now one workaround to try: remove
yarn.lock(orpackage-lock.json) and re-install dependencies.Got rid of the error via
yarn-deduplicate && yarn😃