strapi / strapi-starter-gatsby-catalog

Strapi Starter Gatsby Catalog
strapi-starter-gatsby-catalog-strapijs.vercel.app
MIT License
28 stars 16 forks source link

localhost builds of the Strapi Catalog project now fail #24

Open dpcunningham opened 2 years ago

dpcunningham commented 2 years ago

Several months ago, this demo project built seamlessly. I want to re-use it as a "scratch" project starter, but I am now running into build failures as follows:

$ yarn create strapi-starter my-project gatsby-catalog
yarn create v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-strapi-starter@4.0.0" with binaries:
      - create-strapi-starter
[#############################################################################################################] 119/119?? Choose your installation type Quickstart (recommended)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getPackageInfo (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/fetch-npm-starter.js:19:27)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async getStarterInfo (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:109:26)
    at async buildStarter (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:133:7)
Done in 4.65s.

Version checks show the following:

$ yarn --version
1.22.17
$ npm --version
6.14.15
$ npx --version
6.14.15
dpcunningham commented 2 years ago

FWIW, others have noted that this build sequence:

npx create-strapi-starter@3 my-project gatsby-catalog

...DOES work, but the version-picking modifier (@3) is not compatible with yarn builds, which we need.

Is this indicating some version compatibility problem with V4 vs V3?

CaesiumY commented 2 years ago

gatsby-source-strapi is only compatible with Strapi v3 at the moment.

cwyl02 commented 2 years ago

now that strapi v4 support gatsby v4, I think it would be highly valuable to fix the starter too

https://malgamves.notion.site/How-Gatsby-and-Strapi-v4-Work-Together-bcdb6ae80e7347978f06a752af2efc42