Open SerJaimeLannister opened 1 week ago
@SerJaimeLannister may i ask if that's really all the content of your file svelte.config.js
?
Okay. I was able to reproduce. Mine is also looking for my-app/build/runtime/control.js
hmm
I find this really weird to be honest. see screenshot below
commands used
bonk
a touch+mkdir utilityUpdate: I have a feeling it's looking for this???? (see terminal right)
Were you able to fix this @uncomfyhalomacro
Were you able to fix this @uncomfyhalomacro
Nope. but i found out how to "make it run". Here is what I did
cp -rf '/home/uncomfy/development/projects/.cache/deno/npm/registry.npmjs.org/@sveltejs/kit/2.7.0/src/runtime' runtime
cp /home/uncomfy/development/projects/.cache/deno/npm/registry.npmjs.org/svelte-eslint-parser/0.41.1/lib/parser/typescript/types.js server/types.js
mkdir -p server page && cp /home/uncomfy/development/projects/.cache/deno/npm/registry.npmjs.org/svelte-eslint-parser/0.41.1/lib/parser/typescript/types.js server/page/types.js
deno compila -A index.js && ./build
It's kind of broken but it's also beyond my abilities.
Nearly was able to. now time to sleep
Hmm , this is kind of "good enough support" and though I appreciate your efforts , I don't think this is worth enough to close this issue
Hopefully someone from the deno team can fix this completely
I found the main issue and opened a new ticket (#26233) to make it easier to reproduce. So, we can close this and proceed with the new (#26233).
You can do some workarounds for this issue. Go into index.js and remove each JSDoc comments with @param
and import(...)
statement (e.g., @param {import('./page/types.js').Cookie['options']}
)
That will make the compile successful.
Something similar is happening with this dependency: https://esm.sh/v135/@sanity/client@6.22.1
I found the main issue and opened a new ticket (#26233) to make it easier to reproduce. So, we can close this and proceed with the new (#26233).
You can do some workarounds for this issue. Go into index.js and remove each JSDoc comments with
@param
andimport(...)
statement (e.g.,@param {import('./page/types.js').Cookie['options']}
)That will make the compile successful.
Hey so I did try to remove the as a workaround and it still doesn't work , do I need to remove this jsdoc comment + import on each file of my project?
jsdoc comment + import on I removed each
'@param {import('
from'build/server/index.js
' and it worked when I compiled it.
Oh, I found a solution. It's not a bug.
Use --no-check
in compile to skip checking thejsdoc
.
deno compile --no-check build/server/index.js
@dsherret @bartlomieju
deno compile --no-check build/server/index.js
hey just a minor nitpick , we don't need to have this for build/server/index.js but rather build/index.js
also when I reload , it actually shows asset to be a 404 for some time but just going to a different page makes it work , its very bizarre to say the least and actually gives this error
Error: Not found: /
at resolve2 (file:///tmp/deno-compile-build/my-app/build/server/index.js:4831:18)
at resolve (file:///tmp/deno-compile-build/my-app/build/server/index.js:4664:34)
at Object.handle (file:///tmp/deno-compile-build/my-app/build/server/index.js:4896:71)
at respond (file:///tmp/deno-compile-build/my-app/build/server/index.js:4662:43)
at eventLoopTick (ext:core/01_core.js:175:7) {
status: 404,
text: "Not Found"
}
https://github.com/user-attachments/assets/60f2cacc-230c-410e-a34b-6b204228c41b
Also I think deno should give a warning / custom flag that hey you should do --no-check like how it does for --unstable-sloppy-imports and even then as in the recent issue by @marvinhagemeister (I know this is amature but I tried looking for the issue but I couldn't find the issue created by marvin for --unstable-sloppy-imports) but If I remember correctly it was about asking at the runtime to enable unstable-sloppy-imports.
I think something like this should also be done with deno compile --no-check
also , fixing the issue as of the video could be of some priority
Version: deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu) (archlinux) v8 12.9.202.13-rusty typescript 5.6.2
Running
deno compile
on a sveltekit app returns aModule not found runtime/control.js
error.Steps to reproduce
- Run
deno -A npm:create-svelte@latest my-app
1.1. Click on Sveltekit demo app 1.2. Yes using typescript syntax 1.3. Selecting all the 5 options presented in the next step using space bar ) (Add eslint , prettier , vitest etc.)- Run
cd my-app
- Run
deno install
- Run
deno run dev
(shows the expected sveltekit demo app at localhost:5173)- Run
deno install npm:svelte-adapter-deno
- Update
svelte.config.js
file to use Deno adapter:// svelte.config.js import adapter from 'svelte-adapter-deno'; export default { kit: { adapter: adapter() } };
- Run
deno run build
to produce build folder and then cd into it (interestingly the last time I ran this it produced a mod.ts file but this time it didn't produce mod.ts I am not exactly sure what has changed since the last time) (this is extremely weird)- but still running deno run index.js and giving it the permissions runs the sveltekit demo app
- Run
deno compile build/server/index.js
Output:
error: Module not found "file:///home/test/Projects/deno/my-app/build/runtime/control.js". at file:///home/test/Projects/deno/my-app/build/server/index.js:1345:23
I thought your issue in compile (step 9) gives you this error.
error: Module not found "file:///home/test/Projects/deno/my-app/build/runtime/control.js". at file:///home/test/Projects/deno/my-app/build/server/index.js:1345:23
and that is mentioned on the label of bug
compile
So, to get build without error module not found (that's error occurs in import in commented JSdoc, it's not bug), use --no-check
with the compile command
Also I think deno should give a warning / custom flag that hey you should do --no-check like how it does for --unstable-sloppy-imports and even then as in the recent issue by @marvinhagemeister (I know this is amature but I tried looking for the issue but I couldn't find the issue created by marvin for --unstable-sloppy-imports) but If I remember correctly it was about asking at the runtime to enable unstable-sloppy-imports.
I think something like this should also be done with deno compile --no-check
also , fixing the issue as of the video could be of some priority
I thought an outside bug was the major issue in compile, which was resolved with --no-check.
@dsherret
oh I see I have to admit my mistake here to compile the sveltekit project we need to actually build by changing the adapter and then compiling build/index.js should atleast make it work though with some issues (instead of build/server/index.js) (this was my first time writing reproducible bug so I am sorry )
@yazan-abdalrahman please check the video that I provided , it shows this error
Error: Not found: /
at resolve2 (file:///tmp/deno-compile-build/my-app/build/server/index.js:4831:18)
at resolve (file:///tmp/deno-compile-build/my-app/build/server/index.js:4664:34)
at Object.handle (file:///tmp/deno-compile-build/my-app/build/server/index.js:4896:71)
at respond (file:///tmp/deno-compile-build/my-app/build/server/index.js:4662:43)
at eventLoopTick (ext:core/01_core.js:175:7) {
status: 404,
text: "Not Found"
}
(this seems a very interesting thing as to why it shows this error )
That is the mentioned issue and his solution; I can't understand what a current issue, can provide further details.
https://github.com/user-attachments/assets/ac7aa582-e4ef-4d3a-a092-07f58b615b28
instead of deno compile build/server/index.js , you have to try deno compile --no-check build/index.js for it to have web app also
also , even when you do that it shows an error on the first reload probably related to how deno runtime probably gets loaded into tmp for the first time
Also a minor nitpick for which I am not sure deserves a full issue is currently we need to use https://github.com/pluvial/svelte-adapter-deno or something along this line & change svelte.config.js because the svelte-adapter-auto doesn't have a default runtime for deno , but this only adds friction I suppose , maybe with deno 2.0 , we can get automatic support for deno in sveltekit?
Sorry, I couldn't find any errors; maybe I misunderstood your requirements, but I believe you had an issue that was not caused by deno compile
.
https://github.com/user-attachments/assets/a668d2de-0626-41c0-bb34-fe4a81fbd756
We should mention deno member; it will be more helpful in clarifying the situation.
@bartlomieju @dsherret
something is wrong with fresh 2.0 built under deno 2.0.1 , it's ok under deno 2.0.0 https://github.com/denoland/fresh/issues/2714
Version: deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu) (archlinux) v8 12.9.202.13-rusty typescript 5.6.2
Running
deno compile
on a sveltekit app returns aModule not found runtime/control.js
error.Steps to reproduce
deno -A npm:create-svelte@latest my-app
1.1. Click on Sveltekit demo app 1.2. Yes using typescript syntax 1.3. Selecting all the 5 options presented in the next step using space bar ) (Add eslint , prettier , vitest etc.)cd my-app
deno install
deno run dev
(shows the expected sveltekit demo app at localhost:5173)deno install npm:svelte-adapter-deno
Update
svelte.config.js
file to use Deno adapter:deno run build
to produce build folder and then cd into it (interestingly the last time I ran this it produced a mod.ts file but this time it didn't produce mod.ts I am not exactly sure what has changed since the last time) (this is extremely weird)deno compile build/server/index.js
Output: