pankod / superplate

A well-structured production-ready frontend boilerplate with Typescript, React Testing Library, styled-component, React Query, .env, Axios, Bundle Analyzer, Prettier and 30+ plugins. superplate creates projects for React.js, Next.js, and refine. https://pankod.github.io/superplate/

Home Page:https://pankod.github.io/superplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to initialize new React project

atlj opened this issue · comments

✔ Cloned remote source successfully.
✔ Select your project type › react
superplate-cli has encountered an error.

If you think this is caused by a bug. Please check out:
https://github.com/pankod/superplate/issues

ERROR /tmp/d-202212-8295-1q6ycbr.8m3g/react/prompt.js:201
                return !answers.features?.includes("storybook");
                                         ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at SAO.prompts (/home/atlj/.npm/_npx/8295/lib/node_modules/superplate-cli/lib/saofile.js:28:27)
    at runPrompts (/home/atlj/.npm/_npx/8295/lib/node_modules/superplate-cli/node_modules/sao/dist/run-prompts.js:19:79)
    at SAO.runGenerator (/home/atlj/.npm/_npx/8295/lib/node_modules/superplate-cli/node_modules/sao/dist/chunk.T-GsVNZ1.js:7126:13)

Tried to create a new React project but got this issue as soon as i clicked React.

May be after it fails on the package installation, just navigate to your project directory and run:
npm install --legacy-peer-deps
I guess the error is triggered by node version you have installed

I just checked my node version and it's v14.18.2

Have you tried running the command in your project directory?

Hey @atlj ,
We've fixed this issue. Could you try again?