Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot replicate gatsby instructions #235

Open
LaloHao opened this issue Sep 3, 2024 · 0 comments
Open

Cannot replicate gatsby instructions #235

LaloHao opened this issue Sep 3, 2024 · 0 comments

Comments

@LaloHao
Copy link

LaloHao commented Sep 3, 2024

I was trying to follow the instructions from here: https://orga.js.org/docs/getting-started/gatsby/

npx gatsby new lalohao.github.io
cd lalohao.github.io
yarn add gatsby-plugin-orga @orgajs/react @orgajs/loader

Then added 'gatsby-plugin-orga' plugin to the gatsby config, unfortunately it fails with the following error:

npm run develop

> [email protected] develop
> gatsby develop

success compile gatsby files - 1.236s
success load gatsby config - 0.020s

 ERROR  UNKNOWN

Error in "/Users/hao/dev/personal/lalohao.github.io/node_modules/gatsby-plugin-orga/gatsby-node": require() of ES Module /Users/hao/dev/personal/lalohao.github.io/node_modules/@orgajs/orgx/index.js from /Users/hao/dev/personal/lalohao.github.io/node_modules/gatsby-plugin-orga/gatsby-node.js not supported.
Instead change the require of index.js in /Users/hao/dev/personal/lalohao.github.io/node_modules/gatsby-plugin-orga/gatsby-node.js to a dynamic import() which is available in all CommonJS modules.



  Error: [ERR_REQUIRE_ESM]: require() of ES Module /Users/hao/dev/personal/lalohao.github.io/node_modules/@orgajs/orgx/index.js from /Users/hao/dev/personal/lalohao.github.io/node_modules/gatsby-plugin-orga/gatsby-node.js not supported.
  Instead change the require of index.js in /Users/hao/dev/personal/lalohao.github.io/node_modules/gatsby-plugin-orga/gatsby-node.js to a dynamic import() which is available in all CommonJS modules.

  - gatsby-node.js:7 Object.<anonymous>
    [lalohao.github.io]/[gatsby-plugin-orga]/gatsby-node.js:7:21


not finished load plugins - 0.739s

These are the versions npx installed for me:

  "dependencies": {
    "@orgajs/loader": "^4.2.1",
    "@orgajs/react": "^4.1.1",
    "gatsby": "^5.13.7",

Do you know if i missed anything to make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant