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

[BUG] Can't run using deno and manual installation #6335

Open
vadim-su opened this issue Sep 15, 2024 · 2 comments
Open

[BUG] Can't run using deno and manual installation #6335

vadim-su opened this issue Sep 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vadim-su
Copy link

vadim-su commented Sep 15, 2024

Describe the bug

Cli doesn't work

Steps To Reproduce

deno run -A --node-modules-dir npm:@refinedev/cli dev

error: Uncaught Error: ./package.json not found
    at $ (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:1:1192)
    at L (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:1:1305)
    at h (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:2:3020)
    at Uo (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:2:7920)
    at Yn (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:39:9132)
    at Object.<anonymous> (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:39:9394)
    at Object.<anonymous> (file:///workspace/frontend/node_modules/.deno/@refinedev+cli@2.16.38_1/node_modules/@refinedev/cli/dist/cli.cjs:41:4)
    at Module._compile (node:module:736:34)
    at Object.Module._extensions..js (node:module:757:11)
    at Module.load (node:module:655:32)

Expected behavior

Cli runs dev server

Packages

  • deno 1.46.3
  • npm:@refinedev/cli@^2.16.38
  • npm:@refinedev/core@^4.54.1
  • npm:@types/react@^18.3.5
  • npm:@types/react-dom@^18.3.0
  • npm:react@^18.3.1
  • npm:react-dom@^18.3.1
  • npm:vite@^5.4.5

Additional Context

No response

@vadim-su vadim-su added the bug Something isn't working label Sep 15, 2024
@aliemir
Copy link
Member

aliemir commented Sep 16, 2024

Hey @vadim-su sorry for the issue! Looks like we're having issues when locating the package.json in deno environment. This is used by @refinedev/cli to provide notifications about the latest version updates and use proper commands and codes in CLI's commands such as add and devtools. Can you check if replacing refine dev command with vite in your package.json resolves the issue. I'm asking this to make sure other packages don't have any issues in your environment. We can work on updating the logic we use to detect and read package.json to work with demo 🤔

@BatuhanW BatuhanW changed the title [BUG]Can't run using deno and manual installation [BUG] Can't run using deno and manual installation Sep 19, 2024
@vadim-su
Copy link
Author

@aliemir Vite works pretty well. Currently, I use vite dev for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants