continue icon indicating copy to clipboard operation
continue copied to clipboard

F5 to run it, get Uncaught Error Error: Could not find module root given file: "node:internal/modules/cjs/loader". Do you have a `package.json` file?

Open inoutw opened this issue 11 months ago • 3 comments

Before submitting your bug report

Relevant environment info

- OS: Windows X86
- Continue: v0.8.27
- IDE: VSCode 1.78.2

Description

I've installed all dependencies, and run the project, got this error: Process exited with code 1 Uncaught Error Error: Could not find module root given file: "node:internal/modules/cjs/loader". Do you have a package.json file? at getRoot (d:\workspace\github\continue\pkg\out\index.js:13151:17) at bindings (d:\workspace\github\continue\pkg\out\index.js:13078:37) at ../core/node_modules/sqlite3/lib/sqlite3-binding.js (d:\workspace\github\continue\pkg\out\index.js:13166:41) at __require (d:\workspace\github\continue\pkg\out\index.js:18:51) at ../core/node_modules/sqlite3/lib/sqlite3.js (d:\workspace\github\continue\pkg\out\index.js:13216:20) at __require (d:\workspace\github\continue\pkg\out\index.js:18:51) at (d:\workspace\github\continue\pkg\out\index.js:283604:30) at Module._compile (internal/modules/cjs/loader:1368:14) at Module._extensions..js (internal/modules/cjs/loader:1426:10) at Module.load (internal/modules/cjs/loader:1205:32) at Module._load (internal/modules/cjs/loader:1021:12) at executeUserEntryPoint (internal/modules/run_main:142:12) at (internal/main/run_main_module:28:49)

To reproduce

No response

Log output

No response

inoutw avatar Mar 27 '24 07:03 inoutw

Hi @inoutw, thanks for sharing the logs! I finally found the cause of this and it appears to have been solved by renaming the pkg folder to "binary" to avoid a naming conflict (https://github.com/continuedev/continue/commit/3ad9e3e5f22bd4f1823ab8a8fc9ec745ebb62ac0). I'm going to close the issue, but please re-open and let me know if pulling the latest still leads to the same exact error.

sestinj avatar Apr 14 '24 22:04 sestinj

@sestinj Sorry, I think it should be reopen. Because I checked out v0.8.25 version which was fixed by PR https://github.com/continuedev/continue/commit/3ad9e3e5f22bd4f1823ab8a8fc9ec745ebb62ac0 . However, it still does not work as below: 截屏2024-05-09 上午9 12 23

micli avatar May 09 '24 01:05 micli

@micli Is this happening on the preview branch as well?

sestinj avatar May 15 '24 07:05 sestinj