Comments (6)
No, didn't fix it.
Here's the code I ran:
import { opine } from "https://deno.land/x/[email protected]/mod.ts";
const app = opine();
app.use((req, res) => {
res.send("Hello World");
});
app.listen(3000);
Here's the result:
rick@rick-XPS-8920:~/Working/Playpen/deno/OpineTemplate$ deno run --allow-net sampleOpine.ts
Check file:///home/rick/Working/Playpen/deno/OpineTemplate/sampleOpine.ts
error: TS2305 [ERROR]: Module '"./_utils"' has no exported member 'normalizeEncoding'.
import { notImplemented, normalizeEncoding } from "./_utils.ts";
~~~~~~~~~~~~~~~~~
at https://deno.land/std/node/buffer.ts:3:26
from opine.
@rglowrey ah yes, saw this is in one of my other repos - one of the subdependencies hasn’t locked its versions causing this issue - I’ll get a patch out this morning shortly.
from opine.
@rglowrey please can you try out 0.17.0
and see if that is fixed for you? 🙂 I would also recommend always using a specific version of opine
- the main
branch is not 100% guaranteed to be stable (though is generally the plan!).
REF: https://github.com/asos-craigmorten/opine/releases/tag/0.17.0
from opine.
@rglowrey Hmm... the classic and somewhat unhelpful "works for me"!
Can you try with the --reload
flag? I wonder if you've got a cached "bad" subdependency somewhere? I.e.
$ deno run --allow-net --allow-read --reload sampleOpine.ts
from opine.
Now I get to give the classic "so it really WAS me all along!". Yes, running with the --reload flag did the trick. Also, when I ran it with the first line
import { opine } from "https://deno.land/x/opine@main/mod.ts";
it worked fine after that --reload. Thanks for your help, and sorry for the bother.
from opine.
@rglowrey no bother at all! I believe the initial problem lay with Opine 😂 or specifically one of it's dependencies - something I think needs ironed out in Deno is sub-dependency resolution, conflicts etc. I don't think there is a way to "lock" versions for consumers of a module. The only thing consumers can do afaik is find a "good" version and then use the --lock-write
and subsequently --lock
flags to protect themselves from these errors - I don't think it can be fixed upstream just yet...?
Glad it works now anyway!
from opine.
Related Issues (20)
- Calling req.body.read() in a post or put method crashes deno HOT 2
- Incompatible with Deno 1.14.0 HOT 4
- Dependency error, no exported member default for several dependencies HOT 1
- Cross-Platform Path Separatores in serveStatic HOT 1
- TS2305 ERROR in deps.ts with range-parser default export HOT 2
- Bug on deno std, or opine ??? HOT 4
- Outdated dependencies
- Some (but not all) static files fail to be served - ERR_CONTENT_LENGTH_MISMATCH HOT 11
- Getting a plain Deno Request object from an OpineRequest? HOT 8
- JSON middleware does not work on Deno Deploy HOT 1
- How to read a request received from a html form? HOT 2
- FormData parser middleware is missing HOT 1
- Deno.Buffer will be deprecated in Deno 2.0 HOT 1
- Type incompatibility with Deno 1.20.1 HOT 5
- Opine can't find template views on Deno Deploy HOT 3
- [QUESTION] how to send ReadableStream<Uint8Array>? HOT 2
- Requested module doesn't provide required data HOT 1
- How to upload file?? HOT 1
- Request protocol for WebSocket upgrade request is always http HOT 2
- server-sent-events with opine 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 opine.