GithubHelp home page GithubHelp logo

Comments (7)

desclapez avatar desclapez commented on September 1, 2024 1

Ok I think I found the issue, the tests failing had a problem because the 'fs' module was being mocked in a non proper way, looks that someone put the code there to mock the whole node_modules folder... 🤦🏻

So I'm sorting that now, sorry for the inconvenience :)

This can be closed

from next-test-api-route-handler.

Xunnamius avatar Xunnamius commented on September 1, 2024

This is interesting, because the Actions tests are still passing with node 20.x. I'll investigate this today.

from next-test-api-route-handler.

Xunnamius avatar Xunnamius commented on September 1, 2024

@desclapez Hmm, I can't seem to reproduce this on Linux (Ubuntu) using node 20.5.1 or 20.9.0 or Windows (Windows 10) using 18.18.2.

That EBADF: bad file descriptor, fstat as the first error in the list is telling. Stackoverflow suggests this could be due to your Node runtime environment. Perhaps you're using some non-standard environment variables? These issues suggests that it's not a Node issue at all but an underlying filesystem/OS problem.

Do you have a different system you could run your tests on?

from next-test-api-route-handler.

desclapez avatar desclapez commented on September 1, 2024

Hi @Xunnamius, regarding my operating system, is Macosx Ventura, version 13.0. The hardware is an Apple M1 Pro Max. I've tried in another Macosx Ventura, version 13.6, running on an Apple M1 Pro Max and the result is the same.

Since I do not have another machine/s right now, I've tried the following using docker in my Apple laptop:

  • In ubuntu 20 and ubuntu 22 containers I have same results I've post in my first comment. Also I would like to mention that the pipeline of my personal project uses github actions with ubuntu 22.04 and the unit tests also fails with the same error.

  • Now I'm trying in both OS (macosx ventura and ubuntu 20/22) to clone this repo and run the tests, but all them failed in the npm ci step with the following error:

root@6320e42390c9:/var/local/next-test-api-route-handler# npm ci
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @ergodark/[email protected]: this package has been superseded by @xunnamius/types
npm WARN tarball tarball data for semantic-release@https://xunn.at/semantic-release-atam (sha512-ClfsCGVF9IBrmQLJPGuaXw9+7R8KANo8r68NC/hSZpcVtl52RTuUgnLrFAmenu7nE5O9FpXd6reJdp2aueDzgQ==) seems to be corrupted. Trying again.
npm notice 
npm notice New minor version of npm available! 10.1.0 -> 10.2.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.2
npm notice Run npm install -g [email protected] to update!
npm notice 
npm ERR! code EINTEGRITY
npm ERR! sha512-ClfsCGVF9IBrmQLJPGuaXw9+7R8KANo8r68NC/hSZpcVtl52RTuUgnLrFAmenu7nE5O9FpXd6reJdp2aueDzgQ== integrity checksum failed when using sha512: wanted sha512-ClfsCGVF9IBrmQLJPGuaXw9+7R8KANo8r68NC/hSZpcVtl52RTuUgnLrFAmenu7nE5O9FpXd6reJdp2aueDzgQ== but got sha512-DHyVFdPSQLK6qwAdcsUqCmikH3+E1FjAT9Z9vb4iktOac0fRvgDvZV4MCGknqaXZ6+BB7aq5AaCnjs6dQ9gjuQ==. (425956 bytes)

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-11-01T21_56_51_274Z-debug-0.log

Also I would like to mention that I manage the node versions with nvm use & nvm install, in case that matters.

from next-test-api-route-handler.

desclapez avatar desclapez commented on September 1, 2024

I can't seem to reproduce this on Linux (Ubuntu) using node 20.5.1 or 20.9.0 or Windows (Windows 10) using 18.18.2.

Btw I'm curious about the node version used in github actions, since it says 20.x but I would like to see in any log the actual current version being used (how that 20.x is being resolved), could you point me to it please? :)

from next-test-api-route-handler.

Xunnamius avatar Xunnamius commented on September 1, 2024

Btw I'm curious about the node version used in github actions, since it says 20.x but I would like to see in any log the actual current version being used (how that 20.x is being resolved), could you point me to it please? :)

You can see the specific node version selected here. Don't mind the 21.x test. Actually, I think only I can see this log. Oops!

I attempted to reproduce your result on my local machines using 20.5.1, 20.9.0, and 18.18.2.

from next-test-api-route-handler.

Xunnamius avatar Xunnamius commented on September 1, 2024

Ah, yeah, mocking fs too deeply can get pretty gnarly in my experience. No problem and thanks for investigating :)

from next-test-api-route-handler.

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.