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

intellij build and run fail #3739

Open
3 tasks done
Micro66 opened this issue Jan 15, 2025 · 2 comments
Open
3 tasks done

intellij build and run fail #3739

Micro66 opened this issue Jan 15, 2025 · 2 comments
Assignees
Labels
area:build Relates to building extensions from source dependencies Pull requests that update a dependency file ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior

Comments

@Micro66
Copy link

Micro66 commented Jan 15, 2025

Before submitting your bug report

Relevant environment info

- OS:
- Continue version:
- IDE version:
- Model:
- config.json:

Description

When I run the command sh scripts/install-dependencies.sh to complete the build process and then navigate to continue_base to execute ./binary/bin/darwin-arm64/continue-binary, I encounter the following error. How can I resolve it?

➜  darwin-arm64 git:(master) ✗ ./continue-binary 
/snapshot/continue_base/binary/out/index.js:1369
`)),o.tries=t,o}pzt.exports=ale=f6i;ale.getFileName=function(e){var t=Error.prepareStackTrace,n=Error.stackTraceLimit,r={},a;Error.stackTraceLimit=10,Error.prepareStackTrace=function(o,l){for(var c=0,u=l.length;c<u;c++)if(a=l[c].getFileName(),a!==__filename)if(e){if(a!==e)return}else return},Error.captureStackTrace(r),r.stack,Error.prepareStackTrace=t,Error.stackTraceLimit=n;var s="file://";return a.indexOf(s)===0&&(a=w6i(a)),a};ale.getRoot=function(e){for(var t=C6i(e),n;;){if(t==="."&&(t=process.cwd()),hzt(dMe(t,"package.json"))||hzt(dMe(t,"node_modules")))return t;if(n===t)throw new Error('Could not find module root given file: "'+e+'". Do you have a `package.json` file? ');n=t,t=dMe(t,"..")}}});var Qzt=w((LNc,gzt)=>{h();gzt.exports=mzt()("node_sqlite3.node")});var Bzt=w(bzt=>{h();var N6i=require("util");function y6i(A,e,t){let n=A[e];A[e]=function(){let r=new Error,a=A.constructor.name+"#"+e+"("+Array.prototype.slice.call(arguments).map(function(o){return N6i.inspect(o,!1,0)}).join(", ")+")";typeof t>"u"&&(t=-1),t<0&&(t+=arguments.length);let s=arguments[t];return typeof arguments[t]=="function"&&(arguments[t]=function(){let l=arguments[0];return l&&l.stack&&!l.__augmented&&(l.stack=Gzt(l).join(`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^

Error: Could not find module root given file: "/snapshot/continue_base/binary/out/index.js". Do you have a `package.json` file? 
    at ale.getRoot (/snapshot/continue_base/binary/out/index.js:1369:589)
    at f6i (/snapshot/continue_base/binary/out/index.js:1367:5370)
    at /snapshot/continue_base/binary/out/index.js:1369:751
    at /snapshot/continue_base/binary/out/index.js:1:357
    at /snapshot/continue_base/binary/out/index.js:1374:112
    at /snapshot/continue_base/binary/out/index.js:1:357
    at /snapshot/continue_base/binary/out/index.js:1374:2816
    at /snapshot/continue_base/binary/out/index.js:1:325
    at /snapshot/continue_base/binary/out/index.js:1644:2554
    at /snapshot/continue_base/binary/out/index.js:1:325

Node.js v18.5.0

To reproduce

No response

Log output

No response

@dosubot dosubot bot added area:build Relates to building extensions from source dependencies Pull requests that update a dependency file kind:bug Indicates an unexpected problem or unintended behavior ide:jetbrains Relates specifically to JetBrains extension labels Jan 15, 2025
@Micro66
Copy link
Author

Micro66 commented Jan 15, 2025

Is it because binary/build.js lacks this part of content

// Generate out/package.json
  fs.writeFileSync(
    path.join(out, "package.json"),
    JSON.stringify(
      {
        name: "continue-binary",
        version: "1.0.0",
        author: "Continue Dev, Inc",
        license: "Apache-2.0",
        main: "index.js",
        bin: "index.js",
      },
      null,
      2
    )
  );

@Patrick-Erichsen
Copy link
Collaborator

I have a PR open that we will merge today that resolves this: https://github.com/continuedev/continue/pull/3729/files#diff-dc2950379708345a74f3dc6d8b68a6943d54f70958e9acdf8d134cc5d6778b42

Thanks for the +1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:build Relates to building extensions from source dependencies Pull requests that update a dependency file ide:jetbrains Relates specifically to JetBrains extension kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants