[feat]: add native support for deno 2 as a package manager.
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
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
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.
No stale. Something went wrong with the stale bot.
Trying out migrating a vite project that has some shadcn components in it. Running into this issue as well.
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.
+1 here echoing frustrations with lack of deno 2 support
Just to not let issue go stale. Shadcn does need deno support
Would the following PR fix it? https://github.com/shadcn-ui/ui/pull/7006
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
Support for deno is still needed, and it seems like the working implementation from the mentioned PR is just waiting to be approved.