GithubHelp home page GithubHelp logo

error: module not found about bkg HOT 8 CLOSED

theseyan avatar theseyan commented on August 25, 2024
error: module not found

from bkg.

Comments (8)

paulocoghi avatar paulocoghi commented on August 25, 2024 1

Feedback to maintainers. On src/compiler.zig, it would be interesting to not compile the project or give a warning when the entry point file doesn't exists.

from bkg.

theseyan avatar theseyan commented on August 25, 2024 1

Hi, like @paulocoghi suggested, bkg assumes index.js to be the entry point of the application. This can be changed by creating a bkg.config.json at the root directory of your project:

{
    "entry": "app.ts"
}

I definitely agree that the error message is vague; in a newer version bkg will refuse to compile if it can't find the entrypoint, with a more elegant message.

from bkg.

paulocoghi avatar paulocoghi commented on August 25, 2024

I believe it would be less difficult to the maintainers to help if you provide reproducible details. In case it's too much code, could you publish on a repository?

from bkg.

mjp0 avatar mjp0 commented on August 25, 2024

@paulocoghi That's the thing, I have literally one file called my cli.ts and it's literally one line: console.log('TBD') :D

from bkg.

paulocoghi avatar paulocoghi commented on August 25, 2024

Good news. In my tests, I identified that only index.js works as a default entry point, and using any other file, like index.ts, will reproduce your error.

The solution is to inform bkg what your entry point is, by creating a bkg.config.json with the content:

{
    "entry": "index.ts"
}

It will work properly, then.

from bkg.

paulocoghi avatar paulocoghi commented on August 25, 2024

@mjp0 When possible, could you try the proposed solution and give a feedback?

from bkg.

mjp0 avatar mjp0 commented on August 25, 2024

@mjp0 When possible, could you try the proposed solution and give a feedback?

Works for me too.

from bkg.

gtrabanco avatar gtrabanco commented on August 25, 2024

Also for me

from bkg.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.