-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using package-scripts.js
in ESM context?
#230
Comments
@ctjlewis Have you tried using the
Definitely not as simple as just typing |
I have similar problem, also the old project that use nps. But in my case nps run other nps scripts and |
You have a few options:
{
"config": "./package-scripts.cjs"
} I use the |
Sadly, I have the great misfortune of needing to work on a codebase which uses
nps
, and despite the project's stated goal, "unmaintainable mess" is quite an understatement due to the number of security vulnerabilities and CJS/ESM conflicts I'm getting.Is there any way for me to load
package-scripts.js
in an ESM context? It seems likenps
is just trying to naivelyrequire(...)
the module without checking for mjs extension, sonps -c ./package-scripts.mjs
throwsERR_REQUIRE_ESM
.The text was updated successfully, but these errors were encountered: