strapi-starter-nuxt-e-commerce icon indicating copy to clipboard operation
strapi-starter-nuxt-e-commerce copied to clipboard

JSON issue when trying to yarn create

Open nohehf opened this issue 2 years ago • 1 comments

I tried to install this starter exemple with both yarn and npm, and i got the same output everytime. OS: Windows 10 node -v: v14.15.4 npm -v: 8.3.0 yarn -v: 1.22.15

PS C:\......> yarn create strapi-starter my-project nuxt-e-commerce
yarn create v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-strapi-starter
? 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 (C:\Users\noheh\AppData\Local\Yarn\Data\global\node_modules\create-strapi-starter\utils\fetch-npm-starter.js:19:27)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async getStarterInfo (C:\Users\noheh\AppData\Local\Yarn\Data\global\node_modules\create-strapi-starter\utils\build-starter.js:109:26)
    at async buildStarter (C:\Users\noheh\AppData\Local\Yarn\Data\global\node_modules\create-strapi-starter\utils\build-starter.js:133:7)
Done in 4.11s.

Any idea ?

Edit:

Tried on wsl2, same issue. Same issue with other starters & when using templates, but i can create a default strapi app

nohehf avatar Dec 16 '21 16:12 nohehf

I bumped into the same issue, there is a workaround here but that will be v3 Strapi.

I didn't dig deeper but the main problem is the v4 create-strapi-starter is looking for the template in npm which is nowhere to be found (yet).

laszlo-san avatar Dec 22 '21 15:12 laszlo-san