Skip to content

lightbug_http package support in VSCode #73

@ajshedivy

Description

@ajshedivy

NOTE: I am new to the modular ecosystem so I appreciate you help and patience 😁

I followed the instructions to setup a mojoproject using magic:

  1. Create mojo project
magic init lightbug-test --format mojoproject
  1. Add community channel to mojoproject.toml
[project]
channels = ["conda-forge", "https://conda.modular.com/max", "https://repo.prefix.dev/mojo-community"]
  1. Add lightbug_http package
magic add lightbug_http

mojoproject.toml:

[project]
channels = ["conda-forge", "https://conda.modular.com/max", "https://repo.prefix.dev/mojo-community"]
name = "lightbug-test"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[dependencies]
max = ">=24.5.0,<25"
lightbug_http = ">=0.1.5,<0.2"

Everything up to this point works great, but when I create a mojo file in vscode and import modules from lightbug_http, I get the following error:

unable to locate module 'lightbug_http' mojo

image

I am able to run the server just fine using magic run mojo
image

Is there a setup step or config I am missing that would resolve the import errors with mojo? Is there a way to select a "magic environment" like in python where you can activate a specific environment in vscode?

Desktop (please complete the following information):

  • OS: MacOS
  • Chip: Apple M3 Pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions