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

Typescript error in Eta #18

Closed
oscarotero opened this issue Dec 19, 2020 · 8 comments · Fixed by #19
Closed

Typescript error in Eta #18

oscarotero opened this issue Dec 19, 2020 · 8 comments · Fixed by #19

Comments

@oscarotero
Copy link
Member

oscarotero commented Dec 19, 2020

Hi @shadowtime2000
Trying to test Eta template engine, I'm getting this error:
https://github.com/lumeland/test/runs/1582719319#step:4:430

Any idea why this happens?

BTW, I've implemented a cache cleaner for file changes. (See https://github.com/lumeland/lume/blob/master/engines/eta.js#L18)

@shadowtime2000
Copy link
Contributor

shadowtime2000 commented Dec 19, 2020

I can't figure out what the origin of the Typescript error is, seems to be esm.sh with Pug. Running it with no check on, I think I found the problem, would be patched in #19.

EDIT: #19 will patch one error, but there is still another one (looking into it)

@shadowtime2000
Copy link
Contributor

I found the bug, it seemed to have to do with the partial support of Eta. Passing the config to it should do the trick.

@shadowtime2000
Copy link
Contributor

Still a problem with Typescript, @oscarotero we should add a notice in the docs or something that says to use --no-check.

@oscarotero
Copy link
Member Author

Yep, I still having this problem. Why do you think it happens? Is Eta typescript incompatible with Deno? or it's because lume is a javascript library importing typescript?

@oscarotero oscarotero reopened this Dec 19, 2020
@shadowtime2000
Copy link
Contributor

Is Eta typescript incompatible with Deno?

Eta uses Denoify, a build tool to convert Node TS to Deno TS, and it should work. A JS library importing TS shouldn't cause an error, by looking at the error logs it seems like it is coming from Pug and esm.sh.

@oscarotero
Copy link
Member Author

It's weird. in local it doesn't fail but in https://github.com/lumeland/test/ does. Maybe it's something related with Deno module cache. Pug worked fine until now, so I guess it's a kind of conflict between Pug and Eta.

Anyway, I'll look tomorrow. Thanks!

@shadowtime2000
Copy link
Contributor

If it is a problem with Eta's Deno compat, the v2 proposal may solve that.

@oscarotero
Copy link
Member Author

Ok, finally I fixed this bug using the fork of Pug that I had created, instead import from esm.sh.

Automatic conversion is great but not always works as it should be :)

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

Successfully merging a pull request may close this issue.

2 participants