-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
export 'render' (imported as 'render') was not found in 'mustache' (possible exports: default) #797
Comments
Could you share how you're downloading & using mustache.js? Any building involved or downloading directly from a CDN? E.g. I would not expect the same to happen if you used the simplest alternative from the README: |
I used it via npm without any more configuration like in the angular.json file. A dif between the two versions should give more insights, will do it the next days and report the findings. |
I have the same problem with a Angular 12 nx monorepo.
Our imports looks like:
A downgrade to |
Push: Error is still relevant. Can't upgrade mustache to Version 4.2.0 in the Angular 14 and NX Upgrade process. |
Probably same root cause as #786 ? |
Push: Error is still relevant. |
Import it like |
And enabling |
Apply following patch diff --git a/node_modules/@types/mustache/index.d.ts b/node_modules/@types/mustache/index.d.ts
index 709da20..34d5407 100644
--- a/node_modules/@types/mustache/index.d.ts
+++ b/node_modules/@types/mustache/index.d.ts
@@ -419,4 +419,5 @@ export interface TemplateCache {
clear(): void;
}
-export as namespace Mustache;
+declare const mustache:{render:typeof render, escape:typeof escape, clearCache:typeof clearCache, parse:typeof parse};
+export default mustache; Import as
|
Push, still relevant... unable to update. Dependabot PR is still blocked. |
Downgrade to 4.1.0 works for now 👎 |
Still broken, staying at 4.1.0 |
I make a new TypeScript rewrite fork for it. However, it still lacks test cases and is incompatible with some APIs. If anyone is interested in it, please feel free to contribute it. |
Try this,
I was facing the same same issue today, resolved using these steps. |
I got the error when using it in a library in my angular application.
Error appeared in version
4.2.0
, but not after downgrading to4.1.0
OS: Linux
The text was updated successfully, but these errors were encountered: