devika
devika copied to clipboard
Error on Bun run dev
I cd to the ui folder and bun run dev but I receive the following error message:
$ vite file:///mnt/Essam/AI/devika/ui/node_modules/vite/bin/vite.js:7 await import('source-map-support').then((r) => r.default.install()) ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) error: script "dev" exited with code 1
you should first install bun if u dont have it and then run bun i or bun install.. its just like npm
you should first install bun if u dont have it and then run bun i or bun install.. its just like npm
bun is installed my OS is ubuntu
> bun --version
1.0.35
delete the node_modules folder and reinstall the dependencies, you need to execute "bun install" or "npm install" if bun doesn't work
I cd to the ui folder and bun run dev but I receive the following error message:
$ vite file:///mnt/Essam/AI/devika/ui/node_modules/vite/bin/vite.js:7 await import('source-map-support').then((r) => r.default.install()) ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) error: script "dev" exited with code 1
try reinstalling the Vite package globally (npm install -g vite) or locally (npm install vite) to ensure you have the latest version installed.
I cd to the ui folder and bun run dev but I receive the following error message: $ vite file:///mnt/Essam/AI/devika/ui/node_modules/vite/bin/vite.js:7 await import('source-map-support').then((r) => r.default.install()) ^^^^^ SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) error: script "dev" exited with code 1
try reinstalling the Vite package globally (npm install -g vite) or locally (npm install vite) to ensure you have the latest version installed.
same issue
Running below on WSL
> bun install
Got the error below
`
bun install v1.0.35 (940448d6)
⚙️ @sveltejs/kit [1/2] file:///mnt/d/dev/github/devika/ui/node_modules/@sveltejs/kit/postinstall.js:7
const cwd = process.env.INIT_CWD ?? process.cwd();
^
SyntaxError: Unexpected token '?' at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) ` Any ideas?
Running below on WSL
> bun installGot the error below ` bun install v1.0.35 (940448d6) ⚙️ @sveltejs/kit [1/2] file:///mnt/d/dev/github/devika/ui/node_modules/@sveltejs/kit/postinstall.js:7 const cwd = process.env.INIT_CWD ?? process.cwd(); ^SyntaxError: Unexpected token '?' at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) ` Any ideas?
> npm install does not have the issue. Then I ran with npm run dev instead of bun run dev on WSL. It works but no reponse.
Try running nvm install 21, verify everything is still installed with bun install and then bun run dev should work
Try upgrading your version of npm / node. Fixed it for me on WSL.
sudo npm install -g n
sudo n lts
bun run dev
Before installing latest node:
(devika) voxie3d:~/repos/devika/ui$ bun run dev
$ vite dev
/home/voxie3d/repos/devika/ui/node_modules/vite/bin/vite.js:2
import { performance } from 'node:perf_hooks'
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
error: script "dev" exited with code 1
(devika) voxie3d:~/repos/devika/ui$ npm install
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for [email protected]: wanted: {"node":">= 18"} (current: {"node":"10.19.0","npm":"6.14.4"})
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":">= 18"}
npm ERR! notsup Actual: {"npm":"6.14.4","node":"10.19.0"}
failed to load config from C:\Users\Headstart\devika\ui\vite.config.js
error when starting dev server:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/kit' imported from C:\Users\Headstart\devika\ui\vite.config.js.timestamp-1711603273083-4bf5db431ce54.mjs
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:887:9)
at moduleResolve (node:internal/modules/esm/resolve:936:20)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.
Here : https://github.com/stitionai/devika/issues/36#issuecomment-2015688337