You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Files: tsconfig.dts.json, tsconfig.json, package.json, build.ts are based from official plugins: @elysiajs/static and @elysiajs/cors.
The following steps were done for current project:
$ bun run build
$ bun build.ts
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.3.5
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.3.5
CLI Target: node20
CLI Target: node20
CLI Cleaning output folder
CJS Build start
CLI Cleaning output folder
ESM Build start
CJS dist/cjs/index.js 1.85 KB
CJS ⚡️ Build success in 31ms
ESM dist/index.mjs 255.00 B
ESM ⚡️ Build success in 23ms
$ bun link
bun link v1.1.37 (8ca0eb83)
Success! Registered "wac-demo"
To use wac-demo in a project, run:
bun link wac-demo
Or add it in dependencies in your package.json file:
"wac-demo": "link:wac-demo"
Then I create another new project, for example at ~/Projects/Programming/Bun/ElysiaJS/SSR_React/react_ssr_example/,
and I add my local package with this command:
$ bun link wac-demo --save
[0.04ms] ".env"
bun link v1.1.37 (8ca0eb83)
installed wac-demo@link:wac-demo
1 package installed [10.00ms]
What is the expected behavior?
No error.
What do you see instead?
This error is showed in editor:
No overload matches this call.
The last overload gave the following error.
Argument of type 'Elysia<"", false, { decorator: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; macroFn: {}; }, {}, { derive: {}; resolve: {}; schema: MergeSchema<{}, {}>; }, { ...; }>' is not assignable to parameter of type 'Promise<{ default: AnyElysia; }>'.
Type 'Elysia<"", false, { decorator: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; macroFn: {}; }, {}, { derive: {}; resolve: {}; schema: MergeSchema<{}, {}>; }, { ...; }>' is missing the following properties from type 'Promise<{ default: AnyElysia; }>': then, catch, finally, [Symbol.toStringTag] ts(2769)
index.d.ts(887, 5): The last overload is declared here.
⚠ Error (TS2769)
No overload matches this call.
The last overload gave the following error.
Argument of type:
Elysia<
"",
false,
{ decorator: {}; store: {}; derive: {}; resolve: {} },
{ type: {}; error: {} },
{ schema: {}; macro: {}; macroFn: {} },
{},
{ derive: {}; resolve:: {}; schema: MergeSchema<{}, {}> },
{ ...; }
>
is not assignable to parameter of type Promise<{ default: AnyElysia }>
Type:
Elysia<
"",
false,
{ decorator: {}; store: {}; derive: {}; resolve: {} },
{ type: {}; error: {} },
{ schema: {}; macro: {}; macroFn: {} },
{},
{ derive: {}; resolve:: {}; schema: MergeSchema<{}, {}> },
{ ...; }
>
is missing the following properties from type Promise<{ default: AnyElysia }> :
- then
- catch
- finally
[Symbol.toStringTag]
If I change the function signature of mylogger to this:
No overload matches this call.
The last overload gave the following error.
Argument of type 'Promise<Elysia<"", false, { decorator: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; macroFn: {}; }, {}, { derive: {}; resolve: {}; schema: {}; }, { derive: {}; resolve: {}; schema: {}; }>>' is not assignable to parameter of type 'Promise<{ default: AnyElysia; }>'.
Property 'default' is missing in type 'Elysia<"", false, { decorator: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; macroFn: {}; }, {}, { derive: {}; resolve: {}; schema: {}; }, { derive: {}; resolve: {}; schema: {}; }>' but required in type '{ default: AnyElysia; }'.ts(2769)
index.d.ts(888, 9): 'default' is declared here.
index.d.ts(887, 5): The last overload is declared here.
⚠ Error (TS2769)
No overload matches this call.
The last overload gave the following error.
- Argument of type:
Promise<
Elysia<
"",
false,
{ decorator: {}; store: {}; derive: {}; resolve: {} },
{ type: {}; error: {} },
{ schema: {}; macro: {}; macroFn: {} },
{},
{ derive: {}; resolve:: {}; schema: {} },
{ derive: {}; resolve:: {}; schema: {} }
>
>
is not assignable to parameter of type Promise<{ default: AnyElysia }>
Property "default" is missing in type:
Elysia<
"",
false,
{ decorator: {}; store: {}; derive: {}; resolve: {} },
{ type: {}; error: {} },
{ schema: {}; macro: {}; macroFn: {} },
{},
{ derive: {}; resolve:: {}; schema: {} },
{ derive: {}; resolve:: {}; schema: {} }
>
but required in type { default: AnyElysia }
Additional information
I've downloaded the source codes from official plugins: @elysiajs/static and @elysiajs/cors, and I've tried to use them as local packages by using bun link but I get the error messages.
So either this is an bug of bun link or I'm missing something, however I'm following the info provided here.
Have you try removing the node_modules and bun.lockb and try again yet?
yes
The text was updated successfully, but these errors were encountered:
What version of Elysia is running?
1.1.25
What platform is your computer?
Linux 6.12.1-zen1-1-zen x86_64 unknown
What steps can reproduce the bug?
This is an update of this issue
I'm trying to create a very basic plugin for ElysiaJS, the project for this plugin is located at:
~/Projects/Programming/Bun/_packages/wac-demo/
The project structure is:
tsconfig.json
tsconfig.dts.json
package.json
build.ts
src/index.ts
Files:
tsconfig.dts.json
,tsconfig.json
,package.json
,build.ts
are based from official plugins: @elysiajs/static and @elysiajs/cors.The following steps were done for current project:
Then I create another new project, for example at
~/Projects/Programming/Bun/ElysiaJS/SSR_React/react_ssr_example/
,and I add my local package with this command:
$ bun link wac-demo --save [0.04ms] ".env" bun link v1.1.37 (8ca0eb83) installed wac-demo@link:wac-demo 1 package installed [10.00ms]
What is the expected behavior?
No error.
What do you see instead?
This error is showed in editor:
If I change the function signature of mylogger to this:
The error changes to this:
Additional information
I've downloaded the source codes from official plugins: @elysiajs/static and @elysiajs/cors, and I've tried to use them as local packages by using
bun link
but I get the error messages.So either this is an bug of
bun link
or I'm missing something, however I'm following the info provided here.Have you try removing the
node_modules
andbun.lockb
and try again yet?yes
The text was updated successfully, but these errors were encountered: