You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have nodejs specific issue that only gives problems with the latest release, in older versions it does work. I Couldn't find any other tickets with the issue.
npm create vite@latest
✔ Project name: … vite-project
✔ Select a framework: › React
✔ Select a variant: › TypeScript
cd vite-project
npm run build
> [email protected] build
> tsc && vite build
failed to load config from ~/Desktop/vite-project/vite.config.ts
error during build:
TypeError: Cannot redefine property: File
at Function.defineProperty (<anonymous>)
at Object.<anonymous> (~/Desktop/vite-project/node_modules/@babel/core/lib/index.js:7:8)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (~/Desktop/vite-project/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
It does not work with: node v20.6.0, but it does work with 20.5.1
So It could also be a nodejs / npm specific issue.
Reproduction
see-discription
Steps to reproduce
npm create vite@latest
✔ Project name: … vite-project
✔ Select a framework: › React
✔ Select a variant: › TypeScript
cd vite-project
npm run build
> [email protected] build
> tsc && vite build
failed to load config from~/Desktop/vite-project/vite.config.ts
error during build:
TypeError: Cannot redefine property: File
at Function.defineProperty (<anonymous>)
at Object.<anonymous> (~/Desktop/vite-project/node_modules/@babel/core/lib/index.js:7:8)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (~/Desktop/vite-project/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
System Info
It does work on:
System:
OS: macOS 13.5.1
CPU: (10) arm64 Apple M1 Pro
Memory: 56.91 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.5.1 - ~/.nvm/versions/node/v20.5.1/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.8.0 - ~/.nvm/versions/node/v20.5.1/bin/npm
Watchman: 2023.08.07.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 116.0.5845.179
Safari: 16.6
npmPackages:
@vitejs/plugin-react: ^4.0.3 => 4.0.4
vite: ^4.4.5 => 4.4.9
And it fails on:
Node: 20.6.0 - ~/.nvm/versions/node/v20.6.0/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v20.6.0/bin/npm
failed to load config from /Desktop/vite-project/vite.config.ts
error during build:
TypeError: Cannot redefine property: File
at Function.defineProperty ()
at Object. (/Desktop/vite-project/node_modules/@babel/core/lib/index.js:7:8)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object. (~/Desktop/vite-project/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I have nodejs specific issue that only gives problems with the latest release, in older versions it does work. I Couldn't find any other tickets with the issue.
It does not work with: node v20.6.0, but it does work with 20.5.1
So It could also be a nodejs / npm specific issue.
Reproduction
see-discription
Steps to reproduce
System Info
Used Package Manager
npm
Logs
npm run build -- --debug
failed to load config from
/Desktop/vite-project/vite.config.ts/Desktop/vite-project/node_modules/@babel/core/lib/index.js:7:8)error during build:
TypeError: Cannot redefine property: File
at Function.defineProperty ()
at Object. (
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object. (~/Desktop/vite-project/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
Validations
The text was updated successfully, but these errors were encountered: