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

ETA cannot be rolled up into a web project due to 2 dependencies #242

Closed
daredoes opened this issue Jun 25, 2023 · 4 comments
Closed

ETA cannot be rolled up into a web project due to 2 dependencies #242

daredoes opened this issue Jun 25, 2023 · 4 comments

Comments

@daredoes
Copy link

Describe the bug
ETA is unable to be used in certain projects due to the usage of node:fs and node:path.

To Reproduce
Build a library using RollupJS that uses Eta

Expected behavior
The library builds

Screenshots
If applicable, add screenshots to help explain your problem.
image

Package & Environment Details

  • Environment: Node
  • Version: ex. 16

Additional context
I was able to solve this in my own fork by completely removing the usage of file-handler.ts. It would be great to have file-handler.ts be its own package that can be added into Eta during the configuration.

@nebrelbug
Copy link
Collaborator

@daredoes try importing from "eta/dist/browser.umd.js" or "eta/dist/browser.module.mjs".

@visoft
Copy link

visoft commented Jul 5, 2023

I'm using deno in an edge function, and it doesn't have node:fs or node:path.

I'm seeing

Failed to load module: "node:path" - Unsupported scheme "node" for module "node:path". Supported schemes: [
    "data",
    "blob",
    "file",
    "http",
    "https",
]

Right when I call new Eta()

@visoft
Copy link

visoft commented Jul 5, 2023

I got around the issue by using:

import { Eta } from "https://deno.land/x/eta@v3.0.3/src/core.ts";

@nebrelbug
Copy link
Collaborator

@visoft I think the issue is your Deno version. Which are you using? It will likely need to be 1.31.0 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants