Skip to content
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

Cannot run np globally on Node.js v20.12.2 #747

Open
mesqueeb opened this issue Jun 7, 2024 · 0 comments
Open

Cannot run np globally on Node.js v20.12.2 #747

mesqueeb opened this issue Jun 7, 2024 · 0 comments

Comments

@mesqueeb
Copy link

mesqueeb commented Jun 7, 2024

executing my global np while being in a directory that also has np installed locally.

/usr/local/lib/node_modules/np/node_modules/import-local/index.js:23
	return !filenameInLocalNodeModules && localFile && path.relative(localFile, normalizedFilename) !== '' && require(localFile);
                                                                                                           ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/empidornis/ghq/github.com/mesqueeb/FuegoOnAppleSilicon/node_modules/np/source/cli.js from /usr/local/lib/node_modules/np/node_modules/import-local/index.js not supported.
Instead change the require of cli.js in /usr/local/lib/node_modules/np/node_modules/import-local/index.js to a dynamic import() which is available in all CommonJS modules.
    at module.exports (/usr/local/lib/node_modules/np/node_modules/import-local/index.js:23:108)
    at file:///usr/local/lib/node_modules/np/source/cli.js:9:6 {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v20.12.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant