Closed TheBv closed 7 months ago
Hi @TheBv,
Could you say more about the environment you are running in/what the setup is?
If inside a new folder, I do a git clone and start the server, like so, it works OK:
$ git clone git@github.com:UCL-VR/ubiq.git .
$ cd Node/
$ npm i
$ npm start
Main issue being that we are installing the submodules as dependencies but these are never transpiled to javascript.
Do you mean to say that for your particular project you are including the ubiq server components as submodules in your project? And when transpiling your project it fails to transpile those?
Otherwise I'd suggest that it might be a good idea to add a build step to the project that builds the various modules.
This is a good suggestion for those that might want to transpile rather than use a loader. I will see if I can add a command to the package which demonstrates this.
Could you say more about the environment you are running in/what the setup is?
Good point.
I've just tried this with node version 18 and it works fine.
I was using 19 before so I assume this might be an issue with versions >=19
Sorry for not considering that earlier ^^"
I think the easiest fix would probably to add an "engines" entry to the package.json.
Hi @TheBv, thank you for the update!
I did a quick test of versions 20.11.0 and 19.4.0 and was able to start with those. Do you have the exact version of 19 you were using so I can try it?
Node 19.4.0
with npm 9.2.0
.
Also make sure you rerun npm install
since changing versions seems to install different packages.
Happens both on Windows and Ubuntu.
OK I see the same thing now with 19.4.0 & npm 9.2.0.
It seems version 19.7.0 and above work again.
I will add the engines section to the package to prohibit this set of versions, as suggested!
Done. Thanks for the reporting the issue!
Simply put running
npm i
followed bynpm run start
won't actually start the server. Instead I get the following error:Main issue being that we are installing the submodules as dependencies but these are never transpiled to javascript. So we'd need to tell ts-node that it's allowed to also transpile typescript files by adding the
skipIgnore
flag. E.gts-node-esm --skipIgnore app.ts
I'm not fully convinced that that's the best solution especially since this also requires us to add to
@types
dependencies since they are required by theubiq
-module.Maybe I'm missing something though. Otherwise I'd suggest that it might be a good idea to add a build step to the project that builds the various modules.