You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bun install npm
bun build node_modules/npm/bin/npm-cli.js --compile --bytecode --outfile=bun-npm
Run the executable without removing the nodule_modules directory, works as expected.
bun-npm --help
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, hook, init, install, install-ci-test,
install-test, link, ll, login, logout, ls, org, outdated,
owner, pack, ping, pkg, prefix, profile, prune, publish,
query, rebuild, repo, restart, root, run-script, sbom,
search, set, shrinkwrap, star, stars, start, stop, team,
test, token, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
/home/user/.npmrc
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
[email protected] /home/user/bin/node_modules/npm
Remove the node_modules folder
rm -rf node_modules
What is the expected behavior?
The standalone executable shoule be standalone, without looking for the module source files of the executable on the machine.
What do you see instead?
Run the executable again, without node_modules directory on the machine, and the executable does not work as expected. Can't find a module in node_modules that doesn't exist.
bun-npm --help
error: Cannot find module "/home/user/bin/node_modules/npm/lib/cli/entry.js" from "/$bunfs/root/bun-npm"
at syntaxErrorHandler (/$bunfs/root/bun-npm:287:16)
Additional information
Compare compiling to a standalone executable with Deno
deno add npm:npm
deno compile -A --output=deno-npm node_modules/npm/bin/npm-cli.js
Run the executable to make sure it works
deno-npm --help
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, hook, init, install, install-ci-test,
install-test, link, ll, login, logout, ls, org, outdated,
owner, pack, ping, pkg, prefix, profile, prune, publish,
query, rebuild, repo, restart, root, run-script, sbom,
search, set, shrinkwrap, star, stars, start, stop, team,
test, token, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
/home/user/.npmrc
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
[email protected] /tmp/deno-compile-deno-npm/bin/node_modules/.deno/[email protected]/node_modules/npm
Remove node_modules, and just be sure remove /tmp/deno-compile-deno-npm/bin/node_modules/.deno/[email protected]/node_modules/npm to see if the standalone executable produced by deno still works as expected.
deno-npm
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, hook, init, install, install-ci-test,
install-test, link, ll, login, logout, ls, org, outdated,
owner, pack, ping, pkg, prefix, profile, prune, publish,
query, rebuild, repo, restart, root, run-script, sbom,
search, set, shrinkwrap, star, stars, start, stop, team,
test, token, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
/home/user/.npmrc
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
[email protected] /tmp/deno-compile-deno-npm/bin/node_modules/.deno/[email protected]/node_modules/npm
The standalone executable produced by deno compile still works.
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.31-canary.58
What platform is your computer?
Linux 5.15.0-43-generic x86_64 x86_64 (7283453)
What steps can reproduce the bug?
Run the executable without removing the
nodule_modules
directory, works as expected.Remove the
node_modules
folderWhat is the expected behavior?
The standalone executable shoule be standalone, without looking for the module source files of the executable on the machine.
What do you see instead?
Run the executable again, without
node_modules
directory on the machine, and the executable does not work as expected. Can't find a module innode_modules
that doesn't exist.Additional information
Compare compiling to a standalone executable with Deno
Run the executable to make sure it works
Remove
node_modules
, and just be sure remove/tmp/deno-compile-deno-npm/bin/node_modules/.deno/[email protected]/node_modules/npm
to see if the standalone executable produced bydeno
still works as expected.Run the executable again
The standalone executable produced by
deno compile
still works.The text was updated successfully, but these errors were encountered: