[x] I have read all open and closed Issues and confirm that this is not a duplicate.
Describe the bug
Can't run the app locally with the provided command, throws error
To Reproduce
Steps to reproduce the behavior:
Clone the repo
cd inside
npm run dev
Expected behavior
A clear and concise description of what you expected to happen.
The app to start running locally
Screenshots
If applicable, add screenshots to help explain your problem.
> patriks-chatgpt-implementation@0.0.0 dev /Users/sachit/Documents/Documents - Sachit’s MacBook Pro/Misc/Code/PatrikZeros-ChatGPT-API-UI
> vite
internal/modules/cjs/loader.js:1172
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
0 info it worked if it ends with ok
3 info using node@v12.16.2
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/sachit/Documents/Documents - Sachit’s MacBook Pro/Misc/Code/PatrikZeros-ChatGPT-API-UI/node_modules/vite/bin/vite.js
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1172:13)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'ERR_REQUIRE_ESM'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! patriks-chatgpt-implementation@0.0.0 dev: `vite`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the patriks-chatgpt-implementation@0.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sachit/.npm/_logs/2023-03-18T06_58_22_195Z-debug.log
Desktop (please complete the following information):
Describe the bug Can't run the app locally with the provided command, throws error
To Reproduce Steps to reproduce the behavior:
npm run dev
Expected behavior A clear and concise description of what you expected to happen. The app to start running locally
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):