GithubHelp home page GithubHelp logo

Comments (6)

rglowrey avatar rglowrey commented on May 22, 2024 1

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.

asos-craigmorten avatar asos-craigmorten commented on May 22, 2024

@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.

asos-craigmorten avatar asos-craigmorten commented on May 22, 2024

@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.

asos-craigmorten avatar asos-craigmorten commented on May 22, 2024

@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.

rglowrey avatar rglowrey commented on May 22, 2024

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.

asos-craigmorten avatar asos-craigmorten commented on May 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.