Coder Social home page Coder Social logo

Comments (5)

sigmaSd avatar sigmaSd commented on August 19, 2024

deno 1.43.6+a892353 (canary, x86_64-unknown-linux-gnu)

from deno.

sigmaSd avatar sigmaSd commented on August 19, 2024

The last debug message is coming from here

"Resolved package folder of {} to {}",

so the error is not in deno graph anymore, maybe its in deno npm

from deno.

dsherret avatar dsherret commented on August 19, 2024

so the error is not in deno graph anymore, maybe its in deno npm

No, at this point it would be node execution. It's probably in https://github.com/denoland/deno/tree/main/ext/node

from deno.

sigmaSd avatar sigmaSd commented on August 19, 2024

Seems like there are a couple of places that have this wrong assumption:

https://github.com/denoland/deno/blob/main/ext/fs/interface.rs#L303 which is called from https://github.com/denoland/deno/blob/main/cli/resolver.rs#L296

changing that to utf8_lossy, gets through that point, but now there is another error which seems coming from node module

error: Uncaught (in promise) InvalidData: invalid utf-8 sequence of 1 bytes from index 165105
    at Object.Module._extensions..js (node:module:1053:19)
    at Module.load (node:module:912:32)
    at Function.Module._load (node:module:721:12)
    at Module.require (node:module:934:19)
    at require (node:module:1119:16)
    at file:///home/gitpod/.cache/deno/npm/registry.npmjs.org/js-clipper/1.0.1/clipper.js:3:13

from deno.

sigmaSd avatar sigmaSd commented on August 19, 2024

Everything works if I change https://github.com/denoland/deno/blob/main/ext/fs/interface.rs#L293 and https://github.com/denoland/deno/blob/main/ext/fs/interface.rs#L303 to utf8_lossy

One is called from https://github.com/denoland/deno/blob/main/cli/resolver.rs#L296 and the other from https://github.com/denoland/deno/blob/main/ext/node/polyfills/01_require.js#L1053

@dsherret is it an ok fix to make them utf8lossy ? would be great if someone picks this up, I don't have time to figure out tests

from deno.

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.