ui icon indicating copy to clipboard operation
ui copied to clipboard

[feat]: add native support for deno 2 as a package manager.

Open mattgi opened this issue 1 year ago • 6 comments

Feature description

Deno 2 can be used as a drop in replacement for node and all package managers so please add support for Deno 2 in the CLI.

Code within init and add commands test only for pnpm, yarn, npm, and bun so will not currently support deno. There are other issues as well, such as the dependency upon package.json and tsconfig.

React projects can run fine with these constraints so people will slowly start to prefer deno over node, given the increased speed and native support for TypeScript.

see https://docs.deno.com/deploy/tutorials/vite/#step-1%3A-create-a-vite-app for a working example of running React without a package.json or tsconfig file.

Affected component/components

CLI

Before submitting

  • [X] I've made research efforts and searched the documentation
  • [X] I've searched for existing issues and PRs

mattgi avatar Oct 23 '24 11:10 mattgi

current output from running init:

deno run npm:shadcn@latest init ✅ Granted all env access. ✅ Granted all read access. ✅ Granted all sys access. ✔ The path /git/deno/web does not contain a package.json file. Would you like to start a new Next.js project? … no

mattgi avatar Oct 23 '24 11:10 mattgi

This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.

shadcn avatar Mar 02 '25 11:03 shadcn

No stale. Something went wrong with the stale bot.

shadcn avatar Mar 02 '25 11:03 shadcn

Trying out migrating a vite project that has some shadcn components in it. Running into this issue as well.

atrauzzi avatar Mar 02 '25 21:03 atrauzzi

Yeah same issue, I'm trying to get shadcn to work with Deno 2, no luck thus far. Would be nice to have an easy way of implementing shadcn in a project that uses deno.

deno run npm:shadcn@latest init Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed: ┠─ npm:[email protected] ┃ ┠─ This may cause the packages to not work correctly. ┖─ To run lifecycle scripts, use the --allow-scriptsflag withdeno install`: deno install --allow-scripts=npm:[email protected] ✅ Granted env access to "GRACEFUL_FS_PLATFORM". ✅ Granted env access to "TEST_GRACEFUL_FS_GLOBAL_PATCH". ✅ Granted sys access to "cpus". ✅ Granted env access to "FORCE_COLOR". ✅ Granted env access to "NODE_DISABLE_COLORS". ✅ Granted env access to "NO_COLOR". ✅ Granted env access to "TERM". ✅ Granted env access to "TF_BUILD". ✅ Granted env access to "CI". ✅ Granted env access to "TEAMCITY_VERSION". ✅ Granted env access to "COLORTERM". ✅ Granted env access to "READABLE_STREAM". ✅ Granted env access to "TS_ETW_MODULE_PATH". ✅ Granted read access to "SOME_PATH/NODE_MODULES/.DENO/@[email protected]/NODE_MODULES/@TS-MORPH/COMMON/DIST/TYPESCRIPT.JS". ✅ Granted env access to "TSC_WATCHFILE". ✅ Granted all env access. ✅ Granted all read access. ✅ Granted all sys access. ✖ The path SOME_PATH does not contain a package.json file. Would you like to start a new project? › Next.js

Something went wrong. Please check the error below for more details. If the problem persists, please open an issue on GitHub.

The "path" argument must be of type string. Received undefined`

Would be nice to be able to say no to find the final part about starting a new project.

EpochBoy avatar Mar 11 '25 17:03 EpochBoy

+1 here echoing frustrations with lack of deno 2 support

ErikDombi avatar Apr 21 '25 00:04 ErikDombi

Just to not let issue go stale. Shadcn does need deno support

opticSquid avatar Jun 18 '25 07:06 opticSquid

Would the following PR fix it? https://github.com/shadcn-ui/ui/pull/7006

shadcn avatar Jun 18 '25 12:06 shadcn

Would the following PR fix it? https://github.com/shadcn-ui/ui/pull/7006

Seems like it should. But I would also want others opinion on this

opticSquid avatar Jun 18 '25 12:06 opticSquid

Support for deno is still needed, and it seems like the working implementation from the mentioned PR is just waiting to be approved.

idest avatar Nov 15 '25 21:11 idest