Quenty / NevermoreEngine

ModuleScript loader with reusable and easy unified server-client modules for faster game development on Roblox
https://quenty.github.io/NevermoreEngine/
MIT License
391 stars 124 forks source link

Attempted to call require with invalid argument(s) #429

Closed unrooot closed 2 months ago

unrooot commented 8 months ago

Describe the bug It seems like after installing specific packages (or rather, randomly when you install packages) the loader will fail to require them and output the error "Attempted to call require with invalid argument(s)".

To Reproduce Not entirely certain of repro steps, but after some discussion in the Discord, the consensus seems to be that it sometimes happens when installing packages. It has happened with spritesheet, gameconfig, playerbinder, and observablecollection - although it does not seem to be specific packages, as installing them on other projects will usually work without any problems. Another person pointed out how bugged packages are streamed in with an extra node_modules.

Expected behavior This error should not occur after installing a new package.

Screenshots

CleanShot 2023-11-08 at 21 03 26@2x

image

image

Environment:

Additional context There aren't any errors until I try to require a module from the "bugged" package that gets synced in.

unrooot commented 7 months ago

In the meantime, I can reliably work around this by downgrading the version of the package I installed - I just go to the changelog of the package I'm using and pick a downgraded version number, change the version number in my package.json and then rm -rf node_modules && npm i and the error seems to resolve in most cases.

Quenty commented 5 months ago

This should be patched now, will keep open for a while more.