Git Product home page Git Product logo

Comments (9)

torbjorn-kvist avatar torbjorn-kvist commented on June 5, 2024 1

@dalisoft b0e7e4b solved it for body-parser. Nice!

from middlewares.

dalisoft avatar dalisoft commented on June 5, 2024 1

@torbjorn-kvist Please test it on both ESM and CJS mode and let me know results

from middlewares.

torbjorn-kvist avatar torbjorn-kvist commented on June 5, 2024

it seems that it can be fixed by doing this:
torbjorn-kvist@db7fd3c

Not sure how to test it without publishing an npm package, tried to do a .tgz with npm pack but was not allowed to installed. But tried to do the same changes in node_modules.

When doing these changes it works, also need to the same change in https://github.com/dalisoft/npm-packages/tree/master/packages/getdirname because schemator is using it.

It works if you import the packages as '@nanoexpress/middleware-schemator/module' but then I'm getting the same error for getdirname.

Not sure how you want to solve this, but it seems to work with the current changes on the fork.

from middlewares.

dalisoft avatar dalisoft commented on June 5, 2024

@torbjorn-kvist Can you make PR for this? If possible with tests please, i'll fix this as soon as i can, but seems it's not current month, at next month i think i can do. If you need faster result, please submit PR

from middlewares.

torbjorn-kvist avatar torbjorn-kvist commented on June 5, 2024

Can make a PR for it, but not sure how to test without another repository importing it from package.json. Will try to look into both when I get some time over.

from middlewares.

cryptodeal avatar cryptodeal commented on June 5, 2024

@dalisoft I was able to test body-parser on both ESM and CJS and can confirm both modes are working!

from middlewares.

dalisoft avatar dalisoft commented on June 5, 2024

Thanks @cryptodeal
I also tested body-parser and it works, but i am stuck with schemator plugin solution for getdirname dependency.

from middlewares.

dalisoft avatar dalisoft commented on June 5, 2024

Only schemator has bug with CJS as it's has dependency called getdirname, once i'll fix that dependency, schemator also will be able use full-compatible Node.js power

from middlewares.

dalisoft avatar dalisoft commented on June 5, 2024

Commit 0ca4a3e fixes this issue completely (or should fix at least)

from middlewares.

Related Issues (15)

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.