#Deno with Storybook:Do I need to install node.js? (need npx)
8 messages · Page 1 of 1 (latest)
humm... hardcoded.
$ rg npx .
./dist/proxy.js
5:var args=process.argv.slice(2);if(["dev","build"].includes(args[0]))__require("@storybook/core/cli/bin");else {let command=["npx","--yes",...args[0]==="init"?[`create-storybook@${versions.storybook}`,...args.slice(1)]:[`@storybook/cli@${versions.storybook}`,...args]];spawn(command[0],command.slice(1),{stdio:"inherit",shell:!0}).on("exit",code=>{code!=null&&process.exit(code),process.exit(1);});}
./dist/proxy.cjs
1:"use strict";var import_common=require("@storybook/core/common"),import_child_process=require("child_process"),args=process.argv.slice(2);if(["dev","build"].includes(args[0]))require("@storybook/core/cli/bin");else{let command=["npx","--yes",...args[0]==="init"?[`create-storybook@${import_common.versions.storybook}`,...args.slice(1)]:[`@storybook/cli@${import_common.versions.storybook}`,...args]];(0,import_child_process.spawn)(command[0],command.slice(1),{stdio:"inherit",shell:!0}).on("exit",code=>{code!=null&&process.exit(code),process.exit(1)})}
Another try
$ deno run -A --node-modules-dir=auto npm:create-storybook
Error: Unable to find a usable package manager within NPM, PNPM, Yarn and Yarn 2
at Function.getPackageManager (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/@[email protected]/node_modules/@storybook/core/dist/common/index.cjs:143260:11)
at doInitiate (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/create-storybook/dist/bin/index.cjs:85:947)
at file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/create-storybook/dist/bin/index.cjs:119:337
at withTelemetry (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/@[email protected]/node_modules/@storybook/core/dist/core-server/index.cjs:47080:18)
at initiate (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/create-storybook/dist/bin/index.cjs:119:255)
at Command.<anonymous> (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/create-storybook/dist/bin/index.cjs:120:2077)
at Command.listener [as _actionHandler] (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/commander/lib/command.js:542:17)
at file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (file:///home/yabuki/src/etude-sb/first/node_modules/.deno/[email protected]/node_modules/commander/lib/command.js:1501:27)
humm need to install package manager