When I install this plugin, my gatsby app shows this error. Which will disappear when I comment out it from the gatsby-config.js
Error: [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/hewang/Workspace/gatsby/tutorial-part-two/node_modules/gatsby-source-notion-database/gatsby-node.js require() of ES modules is not supported. require() of /Users/hewang/Workspace/gatsby/tutorial-part-two/node_modules/gatsby-source-notion-database/gatsby-node.js from /Users/hewang/Workspace/gatsby/tutorial-part-two/ node_modules/gatsby/dist/bootstrap/resolve-module-exports.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which define s all .js files in that package scope as ES modules. Instead rename gatsby-node.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/hewang/Workspace/gatsby/tutorial-part-two/node _modules/gatsby-source-notion-database/package.json.
When I install this plugin, my gatsby app shows this error. Which will disappear when I comment out it from the gatsby-config.js
Error: [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/hewang/Workspace/gatsby/tutorial-part-two/node_modules/gatsby-source-notion-database/gatsby-node.js require() of ES modules is not supported. require() of /Users/hewang/Workspace/gatsby/tutorial-part-two/node_modules/gatsby-source-notion-database/gatsby-node.js from /Users/hewang/Workspace/gatsby/tutorial-part-two/ node_modules/gatsby/dist/bootstrap/resolve-module-exports.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which define s all .js files in that package scope as ES modules. Instead rename gatsby-node.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/hewang/Workspace/gatsby/tutorial-part-two/node _modules/gatsby-source-notion-database/package.json.