Code Monkey home page Code Monkey logo

node-nodert's Introduction

Hobbyist programmer from Belgium 🍫🍺🍟 currently located in Thailand πŸ™.
Trying to build cool stuff in my spare time.
Obviously open source 😁😎.

If you like what I do consider checking out my GitHub Sponsors page πŸ€—.

Get in touch

Support / Donate

node-nodert's People

Stargazers

 avatar

Watchers

 avatar

Forkers

matthiasleitner

node-nodert's Issues

Using `nodert` with CJS

I know this package is ESM-only (as node ecosystem should be), but I am wondering how I could make it work in a CJS environment. Won't mind forking and doing the edits just for my project. I am using the package in an electron app - and due to the nature of electron and the electron flavour I am using (vite), I can't transform the main process into esm, so I am stuck with cjs.

Initially tried to do dynamic import: await import('...') which works in development, but the moment I try it in production, it fails:

UnhandledPromiseRejectionWarning: TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified.
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:213:9)
    at subscribeToGeolocation (evalmachine.<anonymous>:1:4739)
    at evalmachine.<anonymous>:1:456440

The code is obfuscated in production btw (bytecode) and then loaded by node vm: https://www.mo4tech.com/electron-code-protection-solution-based-on-node-js-addon-and-v8-bytecode.html
But it seems that process breaks dynamic imports, so now I am stuck with trying to make it work with CJS instead. Thank you for this package btw πŸ˜„, much appreciated

Everything is `undefined`

Hello πŸ‘‹, using this is an electron file. I get error that a particular constructor is undefined. Logging that particular namespace yielded a lot of undefined objects:

[Module: null prototype] {
  AltitudeReferenceSystem: undefined,
  CivicAddress: undefined,
  GeoboundingBox: undefined,
  Geocircle: undefined,
  Geocoordinate: undefined,
  GeocoordinateSatelliteData: undefined,
  GeolocationAccessStatus: undefined,
  Geolocator: undefined,
  // ...
}

I am using electron v30, and the *.node files seem in order. I am not sure whether I was meant to do something first or I am just doing it wrong

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.