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 find module '/nodebox/npm' #59

Open
lebrunel opened this issue Jul 9, 2024 · 0 comments
Open

Cannot find module '/nodebox/npm' #59

lebrunel opened this issue Jul 9, 2024 · 0 comments

Comments

@lebrunel
Copy link

lebrunel commented Jul 9, 2024

Should npm just work as expected within the nodebox? Whenever I try to run any npm command, I get an error saying npm is not available.

For example, if I init the nodebox with a simple package.json with a dev script, when I run:

const info = await sh.runCommand('npm', ['dev'])

I get the error:

{
    "code": "MODULE_NOT_FOUND",
    "parent": "/nodebox/index.js",
    "filepath": "/nodebox/npm",
    "message": "Cannot find module '/nodebox/npm' from '/nodebox/index.js'",
    "name": "Error",
    "stack": "Error: Cannot find module '/nodebox/npm' from '/nodebox/index.js'\n    at _0x16e72a.internalResolveSync (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:1216259)\n    at _0x16e72a.resolveSync (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:1218044)\n    at _0x4cdf65 (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:1218585)\n    at _0x4007f6.resolveModule (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:1238851)\n    at _0x4007f6.load (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:1240113)\n    at _0xfde67f.loadEsModule (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:1246657)\n    at _0x17376b (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:2329245)\n    at MessagePort._0x4c72c8 (https://nodebox-runtime.codesandbox.io/worker-686mf2jx5zo3t9z5wedt8t80gxsi6jq.js:105:2328259)"
}

Just wondering if this is a bug, or if there's something I'm meant to do to make npm available as a command?

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