Closed finestgecko closed 2 years ago
Thank you. The type generation is currently not working as intended and will be fixed in the latest version coming out soon. Until then, a restart of the server should fix the problem and the Route should be available. If not, excluding the /tmp directory from TypeScript should disable the generated types. I will get back to you once it's fixed.
@microeinhundert Thank you, I'll give it a try.
Without digressing too much from the issue, do you plan to open Discussions for the repo or a Discord channel perhaps? I can't seem to figure out the client-side interactivity.
I published a new version 1.9.2 with fixed type generation. There are a few things to keep in mind (your issue was one of them) which are now documented in the docs. The dev server must be restarted manually after adding new routes to the application. This is a technical limitation which I hope to remove long term.
The Discussions here on GitHub are also now enabled for the repository, feel free to ask questions there.
I published a new version 1.9.2 with fixed type generation. There are a few things to keep in mind (your issue was one of them) which are now documented in the docs. The dev server must be restarted manually after adding new routes to the application. This is a technical limitation which I hope to remove long term.
The Discussions here on GitHub are also now enabled for the repository, feel free to ask questions there.
Thank you. I updated the dependencies:
joel@office:~/qms$ npx npm-check-updates -i
Need to install the following packages:
npm-check-updates
Ok to proceed? (y) y
Upgrading /home/joel/qms/package.json
[====================] 40/40 100%
@adonisjs/i18n ^1.5.0 → ^1.5.6
@microeinhundert/radonis ^1.9.1 → ^1.9.2
@microeinhundert/radonis-server ^1.9.1 → ^1.9.2
@microeinhundert/radonis-twind ^1.9.1 → ^1.9.2
@microeinhundert/radonis-unocss ^1.9.1 → ^1.9.2
@types/react ^18.0.0 → ^18.0.20
@types/react-dom ^18.0.0 → ^18.0.6
typescript ~4.6 → ~4.8
Then I tried to run the application and got this:
[dev:*server] Error
[dev:*server]
[dev:*server] Cannot find module '../src/AssetsManager'
[dev:*server] Require stack:
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@microeinhundert+radonis-server@1.9.2_ul64gqjd5kvqldtwaiwi4ak7qq/node_modules/@microeinhundert/radonis-server/build/providers/RadonisProvider.js
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@poppinss+utils@4.0.4/node_modules/@poppinss/utils/build/src/esmRequire.js
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@poppinss+utils@4.0.4/node_modules/@poppinss/utils/build/index.js
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@adonisjs+require-ts@2.0.12/node_modules/@adonisjs/require-ts/build/src/Compiler/index.js
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@adonisjs+require-ts@2.0.12/node_modules/@adonisjs/require-ts/build/index.js
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@adonisjs+assembler@5.8.1_@adonisjs+core@5.8.6/node_modules/@adonisjs/assembler/build/src/requireHook/index.js
[dev:*server] - /home/joel/qms/node_modules/.pnpm/@adonisjs+assembler@5.8.1_@adonisjs+core@5.8.6/node_modules/@adonisjs/assembler/build/register.js
[dev:*server] - internal/preload
[dev:*server]
[dev:*server]
[dev:*server] 1 Object.callback
[dev:*server] /home/joel/qms/node_modules/.pnpm/@microeinhundert+radonis-server@1.9.2_ul64gqjd5kvqldtwaiwi4ak7qq/node_modules/@microeinhundert/radonis-server/build/providers/RadonisProvider.js:51
[dev:*server]
[dev:*server] 2 Bindings.resolve
[dev:*server] /home/joel/qms/node_modules/.pnpm/@adonisjs+fold@8.2.0/node_modules/@adonisjs/fold/build/src/Ioc/Bindings.js:47
[dev:*server]
[dev:*server] 3 Ioc.resolveBinding
[dev:*server] /home/joel/qms/node_modules/.pnpm/@adonisjs+fold@8.2.0/node_modules/@adonisjs/fold/build/src/Ioc/index.js:266
[dev:*server]
[dev:*server] 4 anonymous
[dev:*server] /home/joel/qms/node_modules/.pnpm/@adonisjs+fold@8.2.0/node_modules/@adonisjs/fold/build/src/Ioc/index.js:414
[dev:*server]
[dev:*server] 5 Ioc.withBindings
[dev:*server] /home/joel/qms/node_modules/.pnpm/@adonisjs+fold@8.2.0/node_modules/@adonisjs/fold/build/src/Ioc/index.js:414
[dev:*server]
[dev:*server] [ warn ] Underlying HTTP server died with "0 code"
[dev:*server] [ info ] watching file system for changes
It seems that the AssetsManager path is wrong: https://github.com/microeinhundert/radonis/blob/dd97441085c923be1c907390e98d6368fc4476d6/packages/radonis-server/providers/RadonisProvider.ts#L70
If I go into node_modules
and edit the RadonisProvider
:
../src/AssetsManager
-> ../src/assetsManager
../src/HeadManager
-> ../src/headManager
../src/Renderer
-> ../src/renderer
Seems to have fixed it.
It seems like pnpm does not detect the changes I made to folder casing when updating dependencies. Deleting node_modules and reinstalling should also fix it, although I would find it odd if pnpm had such bug. It worked for me when testing with npm.
It seems like pnpm does not detect the changes I made to folder casing when updating dependencies. Deleting node_modules and reinstalling should also fix it, although I would find it odd if pnpm had such bug. It worked for me when testing with npm.
Hmm, it's a strange one.
I already tried deleting node_modules
before, but I reinstalled with pnpm
.
Just tried it again, this time reinstalling with npm
instead, but I get the same problem.
I also tried clearing the cache, to no avail.
I'll keep trying to see if I can figure it out.
I know what the problem is. I'm on a mac and macOS behaves differently with folder casing. Patch is coming very soon.
It should be fixed now in version 1.9.3.
It should be fixed now in version 1.9.3.
It's working perfectly! Thanks so much for your help. :pray:
First of all, thank you for your efforts with this amazing project :tada: I think it's a considerable addition to the AdonisJS ecosystem and I'm really enjoying working with it.
I'm still learning how things work with Radonis. I copied the "old-school way" example from the Forms section in the docs, but I get a TypeScript error in Visual Studio Code on the
action
prop:The route is registered:
P.S. A quick suggestion—I think it would be useful if the docs could have a somewhat more gentle introduction to the Hydration concept. I know it's not a Radonis-specific concept but having never used hydration before, I'm not really sure where to apply it.