require-handlebars-plugin
require-handlebars-plugin copied to clipboard
Loading templates from relative paths
I get an error when I use relative paths to load templates with the same name as a JavaScript module. The template itself actually loads fine though it just does some more stuff afterwards which throws this.
Uncaught Error: Load timeout for modules: hbs!../src/SelectBox_unnormalized2,hbs!../src/SelectBox
I can fix this by changing the name of the template or using absolute paths. Thought this problem should probably be mentioned in the docs.
Mobile right now, but are you using require 2.1.1?
Yea just updated both the plugin and requirejs
I am having this problem also. If I do an optimized build it works fine though. That makes debugging a little more difficult however
Are you using windows?
On Tue, Nov 13, 2012 at 3:03 PM, Ethan Apodaca [email protected]:
I am having this problem also. If I do an optimized build it works fine though. That makes debugging a little more difficult however
— Reply to this email directly or view it on GitHubhttps://github.com/SlexAxton/require-handlebars-plugin/issues/68#issuecomment-10312945.
Regards, Jakeb
Yes, I am serving my project with a local wamp stack if that matters.
So am I. I've been having tons of trouble lately with file paths through node.
Ok, I solved this. I had the handlebars code in the json2.js file. Make sure the dependencies are correct. You can try stepping through the hbs.js file in the browser to see what is going wrong and check the import variables are set correctly JSON may be null or something else.
Thanks
On Wed, Nov 14, 2012 at 8:40 AM, Ethan Apodaca [email protected]:
Ok, I solved this. I had the handlebars code in the json2.js file. Make sure the dependencies are correct. You can try stepping through the hbs.js file in the browser to see what is going wrong and check the import variables are set correctly JSON may be null or something else.
— Reply to this email directly or view it on GitHubhttps://github.com/SlexAxton/require-handlebars-plugin/issues/68#issuecomment-10339835.
Regards, Jakeb
Whilst it make not be the issue you were having, I came to this issue when trying to resolve the problem I had with my naming convention/directory structure - see #128.