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' #147

Closed
3 tasks done
NikolayMakhonin opened this issue Jan 7, 2021 · 2 comments · Fixed by #149
Labels
bug Something isn't working fixed in insiders build fixed in insiders build; requires confirmation

Comments

@NikolayMakhonin
Copy link

  • 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.

vitejs/vite#1415

@xieyezi
Copy link

xieyezi commented Jan 10, 2021

@anbraten
after Update dependency @vuedx/typecheck to v0.4.1
still have this problem.

node : node/12.13.0
vite: 2.0.0-beta.19
Operating System: mac os big sur 11.0.1
@vuedx/typecheck: v0.4.1

@anbraten
Copy link
Contributor

@xieyezi This error happened with 0.4.1. We have to wait until a new version will be released. Meanwhile I think there is a pre-release: 0.4.2-insiders-1610169628.0. But with this pre-release I still have a issue (see #134). Would be interesting if that applies to you as well.

@znck znck linked a pull request Jan 12, 2021 that will close this issue
@znck znck added the fixed in insiders build fixed in insiders build; requires confirmation label Jan 12, 2021
@znck znck closed this as completed Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in insiders build fixed in insiders build; requires confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants