gatsby-starter-prismic
gatsby-starter-prismic copied to clipboard
npm run develop doesn't run out of box
I followed the steps in the documentation to start this project up and added the content in my Prismic repo, but when I go to run npm run develop
I get the following error:
internal/modules/cjs/loader.js:1102
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /my-project/node_modules/remark-mdx/index.js
require() of ES modules is not supported.
require() of /my-project/node_modules/remark-mdx/index.js from /my-project/node_modules/gatsby-recipes/dist/graphql-server/server.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js
files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /my-project/node_modules/remark-mdx/package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/my-project/node_modules/gatsby-recipes/dist/graphql-server/server.js:52:17)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14) {
code: 'ERR_REQUIRE_ESM'
}
success open and validate gatsby-configs - 0.146s
ERROR #11331 PLUGIN
Invalid plugin options for "gatsby-plugin-manifest":
- "start_url" is not allowed to be empty
not finished load plugins - 1.233s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tannerjuby/.npm/_logs/2021-11-04T18_23_18_637Z-debug.log
The documentation does not correctly reflect how to get this starter up and running
I experienced a similar issue.
12:48:56 PM: Installing NPM modules using NPM version 8.1.2 12:49:01 PM: npm ERR! code ERESOLVE 12:49:01 PM: npm ERR! ERESOLVE unable to resolve dependency tree 12:49:01 PM: npm ERR! 12:49:01 PM: npm ERR! While resolving: [email protected] 12:49:01 PM: npm ERR! Found: [email protected] 12:49:01 PM: npm ERR! node_modules/cypress 12:49:01 PM: npm ERR! dev cypress@"^4.5.0" from the root project 12:49:01 PM: npm ERR! 12:49:01 PM: npm ERR! Could not resolve dependency: 12:49:01 PM: npm ERR! peer cypress@"^3.1.0" from [email protected] 12:49:01 PM: npm ERR! node_modules/gatsby-cypress 12:49:01 PM: npm ERR! dev gatsby-cypress@"^0.2.24" from the root project 12:49:01 PM: npm ERR! 12:49:01 PM: npm ERR! Fix the upstream dependency conflict, or retry 12:49:01 PM: npm ERR! this command with --force, or --legacy-peer-deps 12:49:01 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution. 12:49:01 PM: npm ERR! 12:49:01 PM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report. 12:49:01 PM: npm ERR! A complete log of this run can be found in: 12:49:01 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-12-30T20_49_01_464Z-debug.log