Fleny
Fleny
Explore posts from servers
NNuxt
Created by Fleny on 10/6/2024 in #❓・help
[Nuxt Devtools] fail on string-serialized bigint
No description
2 replies
NNuxt
Created by Fleny on 6/24/2024 in #❓・help
Nitro build warning on ESM and this
Hi, when trying to build my application after Nuxt logs Building Nuxt Nitro server (preset: node-server) i get a bunch of warnings from files in the node_modules (specificly files from arktype and @arktype/schema) like these:
node_modules/.pnpm/[email protected]/node_modules/arktype/out/scope.js (1:25): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
[...]
node_modules/.pnpm/@[email protected]/node_modules/@arktype/schema/out/roots/alias.js (8:28): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
node_modules/.pnpm/[email protected]/node_modules/arktype/out/scope.js (1:25): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
[...]
node_modules/.pnpm/@[email protected]/node_modules/@arktype/schema/out/roots/alias.js (8:28): The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
(there a bunch of them, it would be too long to list them all) Checking the arktype build output it has the TS helpers that TSC would emit and those use this that ESBuild(?) seems to not be so happy with The built server seems to work fine, however the warns are a bit annoying. Also another thing that is quite strange, while i can get the warns when using Windows, trying in WSL and StackBlitz it does not warn. pnpm nuxi info:
- Operating System: Windows_NT
- Node Version: v22.2.0
- Nuxt Version: 3.12.2
- CLI Version: 3.12.0
- Nitro Version: 2.9.6
- Package Manager: [email protected]
- Builder: -
- User Config: devtools
- Runtime Modules: -
- Build Modules: -
- Operating System: Windows_NT
- Node Version: v22.2.0
- Nuxt Version: 3.12.2
- CLI Version: 3.12.0
- Nitro Version: 2.9.6
- Package Manager: [email protected]
- Builder: -
- User Config: devtools
- Runtime Modules: -
- Build Modules: -
repro repo: https://github.com/Fleny113/arktype-nuxt-repro (the server/api/test.post.ts file has the arktype validation)
2 replies
DDeno
Created by Fleny on 2/26/2024 in #help
Source generation for dependencies
Hello, I'm working on a source gen for a library (Node, Deno, Bun) and currently my idea was to override the default types of the library by replacing the file on the node_modules folder, however Deno does not use the node_modules folder so I'm not sure what alternative I have. I have noticed that Deno has a vendor command that puts the deps in a vendor/ dir, (but in my testing it creates a node_modules dir instead), would that be something helpful for what I'm trying to do? For context, the library by-default should ships with a complete interface object and then a CLI* would update those types based on a bunch of configs the CLI* (and runtime) reads adapting the types with the CLI* and the runtime objects, currently the library only does the runtime part and the DX is awful since TS does not have the context to know that the runtime wont have the proprieties. * = The CLI is what I'm trying to build
1 replies
NNuxt
Created by Fleny on 1/19/2023 in #❓・help
Auto-Imports on nitro api routes not working
Auto-importing an util from the utils folder fails resulting in undefined. But when auto-importing useRuntimeConfig for example it works fine reproduction: https://stackblitz.com/edit/github-gwxpc2
1 replies