gatsby-starter-landing-page icon indicating copy to clipboard operation
gatsby-starter-landing-page copied to clipboard

Module not found when using

Open mcsmithers opened this issue 3 years ago • 4 comments

When trying to use this themeusing the command npx gatsby new my-landing-page-site https://github.com/gatsbyjs/gatsby-starter-landing-page after having both the Gatsby and Contentful CLIs install, it throws an error:

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module './lib/parse'

mcsmithers avatar Jan 24 '22 03:01 mcsmithers

Hi, if that's not working, can you try this instead and see if it works?

npm install -g gatsby-cli

After that installs, run:

gatsby new my-landing-page-site https://github.com/gatsbyjs/gatsby-starter-landing-page

Hope this helps!

jxnblk avatar Jan 28 '22 14:01 jxnblk

Thanks. I tried this and got a different error:

npm ERR! command sh -c husky install
npm ERR! .git can't be found (see https://git.io/Jc3F9)
npm ERR! A complete log of this run can be found in:

 ERROR 
Command failed with exit code 1: npm install
  Error: Command failed with exit code 1: npm install
  - error.js:60 makeError
    [global]/[execa]/lib/error.js:60:11
  - index.js:118 handlePromise
    [global]/[execa]/index.js:118:26
  - task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5
  - init-starter.js:135 install
    [global]/[gatsby-cli]/lib/init-starter.js:135:7
  - init-starter.js:202 clone
    [global]/[gatsby-cli]/lib/init-starter.js:202:3
  - init-starter.js:343 initStarter
    [global]/[gatsby-cli]/lib/init-starter.js:343:5
  - create-cli.js:460 
    [global]/[gatsby-cli]/lib/create-cli.js:460:9

In addition, I actually have Gatsby globally installed already and decided to try using this theme as a plugin which actually is the preference and it almost works. The only issue is when you try to run the command contentful space import --config landing-page-model-and-content.json and the copied content page is in the root of the project, another error of Missing required argument: content-file comes back :Missing required argument: content-file

mcsmithers avatar Jan 28 '22 19:01 mcsmithers

@mcsmithers were you able to resolve this? I'm experiencing the same thing

chrishau5 avatar Jun 09 '22 09:06 chrishau5

i'm getting the same error as mcsmithers. how was this resolved?

gmartin83 avatar Sep 02 '22 23:09 gmartin83