Comments (16)
Yes i know but as i say on the issue, the version of vite have a security issue so maybe we need to have an update to update to latest vinxi and vite
from solid-start.
If you check the context section,
Patched version >=4.5.2
from solid-start.
It seems error is still present :
node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@solidjs/start/server/pageEvent.ts:28:9 - error TS2322: Type 'FetchEvent & { manifest: object; assets: string[]; router: { submission: any[] | { url: any; result: any; input: any[]; }; }; routes: any[]; $islands: Set<string>; }' is not assignable to type 'PageEvent'.
The types of 'router.submission' are incompatible between these types.
Type 'any[] | { url: any; result: any; input: any[]; }' is not assignable to type 'Submission<any, any>'.
Type 'any[]' is missing the following properties from type 'Submission<any, any>': input, pending, url, clear, retry
28 const pageEvent: PageEvent = Object.assign(ctx, {
~~~~~~~~~
from solid-start.
I can confirm the commit fix the issue ! Thanks !
from solid-start.
@qlaffont , the solid start 0.5.x is compatible with vinxi 0.2.x, because they are both on vite 4.x.
Vinxi 0.3 is already out, but a new versions of solid-start that uses it is still in the works in this next
branch https://github.com/solidjs/solid-start/tree/next
from solid-start.
Is there a new vite 4.x release out that patches this?
from solid-start.
@nksaraf @ryansolid i believe this ticket boils down to a question of whether there will be patch branches for vinxi 0.2.x / solid-start 0.5.x , or if those versions are to be considered EOL in favor of vinxi 0.3+ and solid-start 0.6+:
from solid-start.
I don't know unfortunatly but i think we should update to 0.3
from solid-start.
@qlaffont are you able to force the new vite 4 version with solid start 0.5 through the use of package.json resolutions? Any idea why it doesn't pick up the patches vite 4 automatically when it's aligned with semver to do so?
from solid-start.
To be honest no, because i use renovate bot to update packages automatically. But i will try when i have time.
from solid-start.
vinxi 0.2.1 has a package json with "vite": "4.5.0"
, instead of i.e. "vite": "^4.5.0"
, so it unfortunately doesn't propagate security patches automatically.
from solid-start.
I have try to force update to vite unfortunalty it doesn't work :
"pnpm": {
"overrides": {
"vite": "4.5.2"
}
},
tsc --project tsconfig.json && eslint src --ext .ts,.tsx --fix
node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@solidjs/start/server/pageEvent.ts:28:9 - error TS2322: Type 'FetchEvent & { manifest: object; assets: string[]; router: { submission: any[] | { url: any; result: any; input: any[]; }; }; routes: any[]; $islands: Set<string>; }' is not assignable to type 'PageEvent'.
The types of 'router.submission' are incompatible between these types.
Type 'any[] | { url: any; result: any; input: any[]; }' is not assignable to type 'Submission<any, any>'.
Type 'any[]' is missing the following properties from type 'Submission<any, any>': input, pending, url, clear, retry
28 const pageEvent: PageEvent = Object.assign(ctx, {
~~~~~~~~~
Found 1 error in node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@solidjs/start/server/pageEvent.ts:28
ELIFECYCLE Command failed with exit code 2.
```
from solid-start.
Generally in beta old releases aren't supported. I'm sorry this took a while just there were other bugs. Let me know if stuff is good in 0.6.x
from solid-start.
any update on the solution ? :/
from solid-start.
I don't get this error locally but I can probably make it shutup. There is a reasonable thought that the router should be more generic in how it extends the Request Event types.. but I will worry about that a bit later.
from solid-start.
@ryansolid fix is not working finally ... (cc @birkskyum 👋 )
pnpm lint
> demo-ventes@ lint /home/quentin/Documents/dev/madeformed/demo-ventes
> tsc --project tsconfig.json && eslint src --ext .ts,.tsx --fix
node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@solidjs/start/server/fetchEvent.ts:76:46 - error TS2345: Argument of type 'OutgoingHttpHeaders' is not assignable to parameter of type '{ [s: string]: string | string[]; } | ArrayLike<string | string[]>'.
Property 'length' is missing in type 'OutgoingHttpHeaders' but required in type 'ArrayLike<string | string[]>'.
76 return Object.entries<string | string[]>(getResponseHeaders(this.event)).forEach(([key, value]) => fn(Array.isArray(value) ? value.join(", ") : value, key, this));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1570:14
1570 readonly length: number;
~~~~~~
'length' is declared here.
node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@solidjs/start/server/fetchEvent.ts:76:161 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'Headers'.
Type 'HeaderProxy' is not assignable to type 'Headers'.
The types returned by 'get(...)' are incompatible between these types.
Type 'string | number' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
76 return Object.entries<string | string[]>(getResponseHeaders(this.event)).forEach(([key, value]) => fn(Array.isArray(value) ? value.join(", ") : value, key, this));
~~~~
node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@solidjs/start/server/fetchEvent.ts:79:46 - error TS2345: Argument of type 'OutgoingHttpHeaders' is not assignable to parameter of type '{ [s: string]: string | string[]; } | ArrayLike<string | string[]>'.
79 return Object.entries<string | string[]>(getResponseHeaders(this.event)).map(([key, value]) => [
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/fetchEvent.ts:88:45 - error TS2345: Argument of type 'OutgoingHttpHeaders' is not assignable to parameter of type 'ArrayLike<string | string[]> | { [s: string]: string | string[]; }'.
Type 'OutgoingHttpHeaders' is not assignable to type 'ArrayLike<string | string[]>'.
88 return Object.values<string | string[]>(getResponseHeaders(this.event)).map((value) =>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/fetchEvent.ts:111:5 - error TS2322: Type 'HeaderProxy' is not assignable to type 'Headers'.
The types returned by 'get(...)' are incompatible between these types.
Type 'string | number' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
111 headers: new HeaderProxy(event)
~~~~~~~
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/types.ts:43:3
43 headers: Headers;
~~~~~~~
The expected type comes from property 'headers' which is declared here on type 'ResponseStub'
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/handler.ts:56:33 - error TS2769: No overload matches this call.
Overload 1 of 2, '(event: HTTPEvent, location: string, code?: number): Promise<void>', gave the following error.
Argument of type 'FetchEvent' is not assignable to parameter of type 'HTTPEvent'.
Overload 2 of 2, '(location: string, code?: number): Promise<void>', gave the following error.
Argument of type 'FetchEvent' is not assignable to parameter of type 'string'.
56 return sendRedirect(event, context.response.headers.get("Location")!);
~~~~~
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/handler.ts:80:31 - error TS2769: No overload matches this call.
Overload 1 of 2, '(event: HTTPEvent, location: string, code?: number): Promise<void>', gave the following error.
Argument of type 'FetchEvent' is not assignable to parameter of type 'HTTPEvent'.
Overload 2 of 2, '(location: string, code?: number): Promise<void>', gave the following error.
Argument of type 'FetchEvent' is not assignable to parameter of type 'string'.
80 return sendRedirect(event, context.response.headers.get("Location")!);
~~~~~
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/pageEvent.ts:9:27 - error TS2345: Argument of type 'FetchEvent' is not assignable to parameter of type 'HTTPEvent'.
Type 'FetchEvent' is missing the following properties from type 'H3Event<EventHandlerRequest>': "__is_event__", node, context, _handled, and 12 more.
9 const flash = getCookie(ctx, "flash");
~~~
node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/pageEvent.ts:14:13 - error TS2345: Argument of type 'FetchEvent' is not assignable to parameter of type 'HTTPEvent'.
14 setCookie(ctx, "flash", "", { maxAge: 0 });
~~~
Found 9 errors in 3 files.
Errors Files
5 node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/fetchEvent.ts:76
2 node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/handler.ts:56
2 node_modules/.pnpm/@solidjs+start@0.6.1_solid-js@1.8.15_vinxi@0.3.10_vite@5.1.5/node_modules/@solidjs/start/server/pageEvent.ts:9
ELIFECYCLE Command failed with exit code 2.
```
from solid-start.
Related Issues (20)
- [Bug?]: client only doesn't work anymore for `props.children` HOT 6
- [Bug?]: Catch-all that starts with number after ellipsis in filename causes hydration errors in nested paths on dev HOT 1
- [Bug?]: Latest Vinxi (>= 0.3.11) causes layout shifts in dev HOT 4
- [Feature?]: Error Handling with solid-router HOT 8
- [Bug?]: Vite server config is being ignored HOT 4
- [Bug?]: Namespaces are completely stripped out of code HOT 4
- [Bug?]: error while importing module, related to `.` in path-name HOT 1
- [Bug?]: createHandler context only called once, renders nonce useless HOT 1
- [Bug?]: Client Only component displayed in app.tsx causes hydration errors HOT 1
- [Bug?]: No value attribute on CSR, but present in SSR HOT 5
- [Bug?]: Typescript error in tsconfig.json for new projects created with pnpm. HOT 1
- Redirect doesn't early exit component when loading from browser address bar HOT 3
- [Bug?]: Frequently generate app.config.timestamp_.js files when i change app.config.js file HOT 1
- [Bug?]: Flakey Hydration Error Key 0-0-0-0-0-0-0-5 HOT 6
- [Bug?]: API routes in file based Route Groups don't work in RC0 HOT 5
- [Bug?]: Extend Solid config causes TS Errors HOT 2
- [Bug?]: Dev server fails to start when installing with new pnpm lockfiles HOT 3
- [Bug?]: The example in the docs doesn't seam to work. HOT 14
- [Bug?]: Issues with API/component routes in routes with parameters in RC1 HOT 3
- [Bug?]: RouteDefinition throw redirect not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solid-start.