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

importMap for file in src/ breaks build, relative to parent instead of project #250

Open
kyeotic opened this issue May 3, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kyeotic
Copy link

kyeotic commented May 3, 2023

I added twind to my import map to map importing it easier

{
  "imports": {
    // ..
    "tw": "./src/twind/twind.ts",
  }
}

This causes the build to fail when it tries to import it relative to the project directory's parent instead of the project directory

❯ deno task build
Task build deno run -A ./build.ts
[ultra] - INFO ✔ Build is valid
[ultra] - INFO Building module graph for entrypoint ./client.tsx
[ultra] - INFO ✔ Module graph built
[ultra] - INFO Vendor modules for entrypoint ./client.tsx
[ultra] - INFO ✔ Vendored 14 modules for entrypoint ./client.tsx
error: Uncaught Error: Failed to resolve from module graph file:///home/kyeotic/dev/src/twind/twind.ts
        throw new Error(

The file is actually located at file:///home/kyeotic/dev/portolfio/src/twind/twind.ts

Here is a commit-pinned repository link. Just run deno task build to see the error.

@mashaal mashaal added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants