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
TypeError: Cannot read property "normalize" from undefined #221
Comments
|
The text plugin needs be loaded by the loader for it to process text! depenencies. Loader plugins are executed as part of a build to resolve their resources. So it should be enough to remove the |
|
i had this error with the text module. We pass jade templates and call Handlebars.compile on these templates to compile them into HTML. However, the optimizer tries to resolve the path to the jade template, and I can't figure out how to fix this. Here is some more info: http://stackoverflow.com/questions/14198686/optimizer-and-handlebars-client-side-jade-templates |
|
In that example, the resource is specified as |
|
Hi I am having a similar issue with the text plugin and optimization over Rhino. I'm running the optimization via Maven (have also been trying directly in ant) and each time I get the following error. If I remove the use of the text plugin from the file then optimization runs fine: [artifact:mvn] [INFO] --- requirejs-maven-plugin:1.1.0:optimize (default) @ require-optimization-dependencies --- The define statement in UsermenuCP.js looks like: define(['require', 'lib/jquery', 'lib/boilerplate/ViewTemplate', 'lib/require/text!control-panel/usermenu/UsermenuV.html', In my build file I have tried to exclude the text plugin but I still get the same issue. I've seen people with the same issue on the web but each time they fix it by moving to Node.js but that is not an option for us. Sorry for all the text but for some reason I'm not able to upload images! Any help would be very much appreciated |
|
@byron633 if you put an does that solve it? If so, then I'll do an update to the text plugin with that change. |
|
@byron633 @jrburke I was having the "Java method java.lang.StringBuffer.append matching JavaScript argument types (null) is ambiguous" issue as well and adding the null check seems have fixed it. A side note is that I'm also using the require-css plugin which is also missing a null check. Adding both checks in allowed the optimizer to complete successfully. |
|
i have the same issue can someone give us a EX to understand ??? |
|
@jbwyme I just pushed a text.js version 2.0.7 that has that line !== null change for the java case. @alachab that sounds like the path issue: it was looking for a /home/adel.lachab/devel-optimizer/dist/js/ajax/getTemplate/user/workspaceHeader.tmpl but it did not exist. Perhaps a paths config was needed for the build config. |
This version is required to load and run brackets properly on node-webkit. See requirejs/text#55 for node-specific details. Summary of changes: > rev to 2.0.10 > Merge pull request adobe#61 from AnSavvides/master > Merge pull request adobe#60 from dakota/patch-1 > rev to 2.0.9 > Merge pull request adobe#55 from busykai/master > Fixes adobe#57 xpcshell: windows FileUtils.File does not like / paths > Rev version for 2.0.7 > Fixes adobe#52, handle non-existent files in node > Fixes issue mentioned in comments for requirejs/r.js#221 about Java usage > Merge pull request adobe#49 from fsbdev/patch-1
I am using Rhino and requirejs for code optimization. Here is my main config
Here is the require optimizer config. I have used the empty:scheme for all the network resources.
the optimizer fails when it encounters the following file
I get the following error
optimize:
[exec] [java] Tracing dependencies for: main
[exec] [java] Cannot optimize network URL, skipping: empty:.js
[exec] [java] TypeError: Cannot read property "normalize" from undefined
[exec] [java] In module tree:
[exec] [java] main
[exec] [java] app
[exec] [java] router
[exec] [java] views/desktop
[exec] [java] TypeError: Cannot read property "normalize" from undefined
[exec] [java] In module tree:
[exec] [java] main
[exec] [java] app
[exec] [java] router
[exec] [java] views/desktop
[exec] [java] Java Result: 1
the issue is occurring only due to the line 'text!../../templates/menu.html'
There are no issues when using relative paths. Why am I seeing this error? Is there some other config that can tell the build to ignore this dependency?
I am using requireJS 2.0.2 and r.js 2.0.2
The text was updated successfully, but these errors were encountered: