Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@vite/create-app: Node v12 is not supported as described in the docs: Error: Cannot find module 'fs/promises' #1415

Closed
3 tasks done
NikolayMakhonin opened this issue Jan 7, 2021 · 1 comment

Comments

@NikolayMakhonin
Copy link

NikolayMakhonin commented Jan 7, 2021

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

I see in this docs (https://vitejs.dev/guide/), that Node v12 is supported, but actually it isn't

Compatibility Note
Vite requires Node.js version >=12.0.0.

see also about this bug: nodejs/node#35740 (comment)

Reproduction

run these commands with Node v12:

npm init @vitejs/app
npm run build

System Info

  • @vitejs/create-app version: 1.0.6
  • vite version: 2.0.0-beta.10
  • Operating System: Windows 7
  • Node version: 12.17.0
  • Package manager (npm) and version: 6.13.6

Logs

Error: Cannot find module 'fs/promises'
Require stack:
- l:\Work\_GIT\GitHub\NodeJs\apps\counter-vue\node_modules\@vuedx\typecheck\dist\index.cjs.js
- l:\Work\_GIT\GitHub\NodeJs\apps\counter-vue\node_modules\@vuedx\typecheck\bin\typecheck.js
←[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:842:27)←[39m
←[90m    at Module.require (internal/modules/cjs/loader.js:1026:19)←[39m
←[90m    at require (internal/modules/cjs/helpers.js:72:18)←[39m
    at Object.<anonymous> (l:\Work\_GIT\GitHub\NodeJs\apps\counter-vue\node_modules\←[4m@vuedx←[24m\typecheck\dist\index.cjs.js:7:13)
←[90m    at Module._compile (internal/modules/cjs/loader.js:1138:30)←[39m
←[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)←[39m
←[90m    at Module.load (internal/modules/cjs/loader.js:986:32)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:879:14)←[39m
←[90m    at Module.require (internal/modules/cjs/loader.js:1026:19)←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: [
    ←[32m'l:\\Work\\_GIT\\GitHub\\NodeJs\\apps\\counter-vue\\node_modules\\@vuedx\\typecheck\\dist\\index.cjs.js'←[39m,
    ←[32m'l:\\Work\\_GIT\\GitHub\\NodeJs\\apps\\counter-vue\\node_modules\\@vuedx\\typecheck\\bin\\typecheck.js'←[39m
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! counter-vue@0.0.0 build: `vuedx-typecheck . && vite build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the counter-vue@0.0.0 build script.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants