S
SolidJS2y ago
Max

solid start typescript 4.9/5 satisfies operator

Hi, wondering is there anything that should be done to use satisfies operator on solid start, update some vite plugins or something? End up with Expected ";" but found "satisfies"' on build Just did on fresh npm init solid@latest ty
6 Replies
Max
MaxOP2y ago
GitHub
[ts] Add support for expr satisfies Type expressions by nicolo-ri...
Q                       A Fixed Issues? Fixes: #15067 Patch: Bug Fix? Major: Breaking Change? Minor: New Feature? Tests Added + Pass? Yes Documentation PR Link Any Dependency C...
mdynnl
mdynnl2y ago
which option did you choose when init-ing? it shouldn't hit babel at all as typescript should've done its part. the error message could help with tracking the root cause if you could provide any please do.
Max
MaxOP2y ago
Hi, thanks for the reply, got this error
Error: Transform failed with 1 error:
<stdin>:41:11: ERROR: Expected ";" but found "satisfies"
at failureErrorWithLog (/root/vf/stories/node_modules/esbuild/lib/main.js:1624:15)
at /root/vf/stories/node_modules/esbuild/lib/main.js:1413:29
at /root/vf/stories/node_modules/esbuild/lib/main.js:678:9
at handleIncomingPacket (/root/vf/stories/node_modules/esbuild/lib/main.js:775:9)
at Socket.readFromStdout (/root/vf/stories/node_modules/esbuild/lib/main.js:644:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [],
pluginName: '',
text: 'Expected ";" but found "satisfies"'
}
],
warnings: []
}
adapter node
Error: Transform failed with 1 error:
<stdin>:41:11: ERROR: Expected ";" but found "satisfies"
at failureErrorWithLog (/root/vf/stories/node_modules/esbuild/lib/main.js:1624:15)
at /root/vf/stories/node_modules/esbuild/lib/main.js:1413:29
at /root/vf/stories/node_modules/esbuild/lib/main.js:678:9
at handleIncomingPacket (/root/vf/stories/node_modules/esbuild/lib/main.js:775:9)
at Socket.readFromStdout (/root/vf/stories/node_modules/esbuild/lib/main.js:644:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [],
pluginName: '',
text: 'Expected ";" but found "satisfies"'
}
],
warnings: []
}
adapter node
but that happens with typescript 5.0.3
├─ @babel/[email protected]
├─ @babel/[email protected]
│ └─ @babel/plugin-syntax-typescript@^7.20.0
├─ @babel/[email protected]
│ └─ @babel/plugin-transform-typescript@^7.21.3
│ ├─ @babel/plugin-syntax-typescript@^7.20.0
│ ├─ @babel/preset-typescript@^7.16.5
│ ├─ @babel/preset-typescript@^7.18.6
│ ├─ @babel/preset-typescript@^7.18.6
├─ @babel/[email protected]
├─ @babel/[email protected]
│ └─ @babel/plugin-syntax-typescript@^7.20.0
├─ @babel/[email protected]
│ └─ @babel/plugin-transform-typescript@^7.21.3
│ ├─ @babel/plugin-syntax-typescript@^7.20.0
│ ├─ @babel/preset-typescript@^7.16.5
│ ├─ @babel/preset-typescript@^7.18.6
│ ├─ @babel/preset-typescript@^7.18.6
I have a similar project (same set up but never updated typescript manually) that works fine, but on ts 4.9.5
├─ @babel/[email protected]
├─ @babel/[email protected]
│ └─ @babel/plugin-syntax-typescript@^7.20.0
├─ @babel/[email protected]
│ └─ @babel/plugin-transform-typescript@^7.21.3
│ ├─ @babel/plugin-syntax-typescript@^7.20.0
│ ├─ @babel/preset-typescript@^7.18.6
│ ├─ @babel/preset-typescript@^7.18.6
│ ├─ @babel/preset-typescript@^7.18.6
├─ @babel/[email protected]
├─ @babel/[email protected]
│ └─ @babel/plugin-syntax-typescript@^7.20.0
├─ @babel/[email protected]
│ └─ @babel/plugin-transform-typescript@^7.21.3
│ ├─ @babel/plugin-syntax-typescript@^7.20.0
│ ├─ @babel/preset-typescript@^7.18.6
│ ├─ @babel/preset-typescript@^7.18.6
│ ├─ @babel/preset-typescript@^7.18.6
could be that for the option, was bare typescript no ssr
mdynnl
mdynnl2y ago
looking at the log, it's esbuild failing to recognize satisfies you could try to build it and see the error still pops up
Max
MaxOP2y ago
Nice thanks, I'll try a few things w esbuild and see
Want results from more Discord servers?
Add your server