Can I run an express application under deno

Or do I need to port it to Oak? Is there an "express -> oak" cheatsheet ?
11 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
dan.the.discloser
Thank you In the with-express examples from https://github.com/denoland/examples.git they just do import express from 'https://cdn.skypack.dev/express'; and with the hello world program, I get
error: Uncaught Error: [Package Error] "zlib" does not exist. (Imported by "destroy").
throw new Error("[Package Error] \"zlib\" does not exist. (Imported by \"destroy\").");
^
at https://cdn.skypack.dev/error/node:zlib?from=destroy:14:7
error: Uncaught Error: [Package Error] "zlib" does not exist. (Imported by "destroy").
throw new Error("[Package Error] \"zlib\" does not exist. (Imported by \"destroy\").");
^
at https://cdn.skypack.dev/error/node:zlib?from=destroy:14:7
What do I to track that down? What's the proper way for me to submit a bug report on the example?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
KyleJune
KyleJune3y ago
If examples don't work they should probably get updated. Idk yet how well npm specifiers work but you could try esm.sh instead of skypack. That might work.
dan.the.discloser
Thank you import express from "npm:express"; works for example. How to I report problems with the examples to whomever updates them? (Or, in this case, how do I put in the change and get the repository updated ?)
KyleJune
KyleJune3y ago
Create an issue on github for the examples repository.
dan.the.discloser
I am new at this. How do I (or how do I learn to) create a github issue?
KyleJune
KyleJune3y ago
Go here https://github.com/denoland/examples Then click on the issues tab and select to create an issue. Mention that the with-express example doesn't work and include a copy of the error you got when you tried to run it. If you want to fix it yourself, you can create a fork of the repo, update your copy, then create a pull request on the repo I linked to. A pull request is a way for asking the repository owners to accept a change you made. I'm not sure if they would accept npm specifier option currently since that feature is still unstable.
dan.the.discloser
thank you & thank you for your patience There are problems with several of examples. Should I create one issue for each or a single issue for all of them?
KyleJune
KyleJune3y ago
One for each is probably better.
dan.the.discloser
thank you