๐งต#Unity Server
Hey, ChatGPT is wrong here "vite": "<= 4.3.9", is totally fine (you can check for yourself using the npmsemver check https://semver.npmjs.com/)
What error did you run into? and ran into an error setting up the local webserver.
Please note that the change you applied did kind of the opposite to what version we had configured.
(your syntax: every minor version since 4.3.9 vs what we had was every version until 4.3.9)
Thank you for getting back to me.
Good to know. The errors I got in my terminal are here. I didn't get an error in the Unity Console. Just a warning about the local host not running (sorry, if I can recreate it later I will).
failed to load config from C:\Users\brian\Documents\Game Development\Personal\NeedleTesting\Needle\newProject\vite.config.js error when starting dev server: Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\brian\Documents\Game Development\Personal\NeedleTesting\Needle\newProject\node_modules\@needle-tools\engine\plugins\vite\index.js' imported from C:\Users\brian\Documents\Game Development\Personal\NeedleTesting\Needle\newProject\vite.config.js.timestamp-1762439420562-3a9a7102a4827.mjs at finalizeResolution (node:internal/modules/esm/resolve:274:11) at moduleResolve (node:internal/modules/esm/resolve:859:10) at defaultResolve (node:internal/modules/esm/resolve:983:11) at #cachedDefaultResolve (node:internal/modules/esm/loader:731:20) at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:310:38) at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:664:36) at TracingChannel.tracePromise (node:diagnostics_channel:344:14) at ModuleLoader.import (node:internal/modules/esm/loader:663:21) at defaultImportModuleDynamicallyForModule (node:internal/modules/esm/utils:222:31)```
Tomorrow morning I'll be back in the project. I'll try and reset the package.json back to the previous syntax. Perhaps it was the powershell commands that fixed the issue and the syntax change wasn't required?
Can you check if the file exists here?
C:\Users\brian\Documents\Game Development\Personal\NeedleTesting\Needle\newProject\node_modules\@needle-tools\engine\plugins\vite\index.js
Perhaps the needle-engine package wasn't fully installed for some reason?
Couple more questions:
- Which OS are you on?
- and which Nodejs and npm version do you use (
node --versionandnpm --version)?
index.js does exist at that directory. Any security concerns if I send it here?
- Windows 11
- node version 22.20.0, npm version 10.3.0
No but it should be fine if the file exists. Which Needle Engine version are you using? I assume latest? It reads like a type error (Typescript related)
Looks like 4.11.5
I reset package.json to the previous syntax and the process is still working. So you're correct.
I'm very new to any webdev. Do you think it was a cache issue? Running npm cache clean followed by npm install might have been all I needed?
No errors or warnings in the Unity console or in the terminal.
I'm honestly not sure right now what happened there - it could be the cache but also that somehow one of the npm / vite processes ran twice at the same time causing a hiccup