FredKSchott / create-snowpack-app

The all-in-one app template for Snowpack. [moved]

Home Page:https://www.snowpack.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't start the app after create react-typescript template project

lvthanh101 opened this issue · comments

I've just create the react typescript app from this command
npx create-snowpack-app snowpack-react-ts --template @snowpack/app-template-react-typescript --use-yarn

then I run yarn start and got error

yarn start
yarn run v1.21.1
$ snowpack dev
internal/modules/cjs/loader.js:625
  throw e;
  ^

Error: No valid exports main found for '~/practises/snowpack-react-ts/node_modules/@rollup/pluginutils'
    at resolveExportsTarget (internal/modules/cjs/loader.js:622:9)
    at applyExports (internal/modules/cjs/loader.js:499:14)
    at resolveExports (internal/modules/cjs/loader.js:548:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:654:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/tluu/practises/snowpack-react-ts/node_modules/@rollup/plugin-commonjs/dist/index.js:7:19)
    at Module._compile (internal/modules/cjs/loader.js:1139:30) {
  code: 'MODULE_NOT_FOUND'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I also tried 2 others templates: react and blank. They also have error.
I'm using node version 13.5.0
Is that cause the problem?

I found a similar issue in vitejs/vite#367 (comment)

Looks like it's a problem on the lower v13 versions only, you can resolve by updating to a supported version of Node.js