spencer
spencer3w ago

How do I troubleshoot this error?

I'm trying to run a fresh project I haven't touched in over a year. I ran the fresh updater but when I try to deno task start it, it gives me an error like this:
spencer@m1 ~/D/D/blog (main)> deno task start
Task start deno run -A --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 0 islands.
error: Uncaught (in promise) TypeError: Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.

import emojis from "./all.json" assert { type: "json" };

at https://deno.land/x/emoji@0.3.0/emoji.ts:2:1

const manifest = (await import(toFileUrl(join(dir, "fresh.gen.ts")).href))
^
at async dev (https://deno.land/x/fresh@1.7.3/src/dev/dev_command.ts:38:21)
at async file:///Users/spencer/Developer/Deno/blog/dev.ts:7:1
Watcher Process failed. Restarting on file change...
^C⏎
spencer@m1 ~/D/D/blog (main)> deno task start
Task start deno run -A --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 0 islands.
error: Uncaught (in promise) TypeError: Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.

import emojis from "./all.json" assert { type: "json" };

at https://deno.land/x/emoji@0.3.0/emoji.ts:2:1

const manifest = (await import(toFileUrl(join(dir, "fresh.gen.ts")).href))
^
at async dev (https://deno.land/x/fresh@1.7.3/src/dev/dev_command.ts:38:21)
at async file:///Users/spencer/Developer/Deno/blog/dev.ts:7:1
Watcher Process failed. Restarting on file change...
^C⏎
I'm not really sure what needs that emoji package (it's not explicitily listed in my deno.json) so I'm not sure how to troubleshoot it? It looks like their is a newer version of the emoji.ts package but I don't know how to update to that since it's not in my deno.json. deno outdated doesn't show anything either
1 Reply
spencer
spencerOP3w ago
I guess it worked by adding "https://deno.land/x/emoji@0.3.0/": "https://deno.land/x/emoji@0.3.1/", to my imports but I'm not sure if that's the best solution

Did you find this page helpful?