-
Notifications
You must be signed in to change notification settings - Fork 7
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
template not found error in Windows #42
Comments
Can you make a repo to reproduce an error? |
So , I tested again and the issue occurs only in windows. There is a template not found error on windows because the template name doesn't match with nunjucks.render(template).
For ref :- |
Suggested change in file loader.js , line 50
I am using the same code, which is used in nunjucks to modify the template name https://github.com/mozilla/nunjucks/blob/master/nunjucks/src/precompile.js#L113 |
I think I need to make sure that path is not changed after precompilation. I will add tests and fix it on this week. |
For history, all tests failed on Windows environment https://travis-ci.org/ogonkov/nunjucks-loader/builds/643552671 |
Seems like it is expected behaviour (mozilla/nunjucks#761 & mozilla/nunjucks#825), and i should force unix-style path in loader too. |
@navedmir please test latest master for your project, does it work for you? You can change version to latest git like {
"devDependencies": {
"simple-nunjucks-loader": "ogonkov/nunjucks-loader#afa716d"
}
} |
Is there a plan to release this anytime soon? |
@navedmirCM sorry, i got your problem. Will release it soon. |
Released in v1.0.1 |
@navedmirCM @navedmir please share your experience with latest version |
It works on windows now, I will test it more with other features. |
I am trying to import a nunjuck template(html file). It is imported correctly but the template path inside the object is messed up, half is windows stlye and half is linux.
browser Console error
list.js?986a:17 Error: template not found: \products\_productLoader.html at createTemplate (nunjucks-slim.js?cede:1497) at next (nunjucks-slim.js?cede:368) at handle (nunjucks-slim.js?cede:1536) at eval (nunjucks-slim.js?cede:1546) at next (nunjucks-slim.js?cede:366)
The bundle object :-
My import statement :-
const _productLoaderHtml = require('../../../views/nunjucks/products/_productLoader.html')
The text was updated successfully, but these errors were encountered: