Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9196149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:47:16+00:00 2026-06-17T21:47:16+00:00

My project uses the text plugin for requirejs, and although the plugin works properly,

  • 0

My project uses the text plugin for requirejs, and although the plugin works properly, the optimizer does not. This a test of my application file:

define([
    'jquery', 
    'underscore',
    //'ui/js/form/LoginForm'
    'text!core/ui/text/form/LoginForm.txt'
], function($, _, template) {
    var initialize = function() {

    }

    return {
        initialize : initialize
    };
});

This is the configuration:

require.config({
    paths : {
        jquery      : 'lib/jquery/jquery',
        underscore  : 'lib/underscore/underscore',
        text        : 'lib/require/text'
    },
    shim: {
        underscore: {
            exports: '_'
        }
    }
});

require([
    'app', 
], function(App) {
    App.initialize();
});

And this is the build configuration:

({
    baseUrl: '../scripts',
    mainConfigFile: '../scripts/main.js',
    name: '../scripts/main',
    out: '../scripts/concatenated-modules.js',
    optimize: 'none',
    optimizeAllPluginResources: true
})

I know without a doubt that the paths in the project are correct as the application itself works. However when building I get this:

C:\wamp\www\build>java -classpath js.jar org.mozilla.javascript.too
ls.shell.Main r.js -o build.js

Tracing dependencies for: ../scripts/main
InternalError: The choice of Java constructor append matching JavaScript argumen
t types (null) is ambiguous; candidate constructors are:
    class java.lang.AbstractStringBuilder append(java.lang.StringBuffer)
    class java.lang.AbstractStringBuilder append(java.lang.String)
    class java.lang.AbstractStringBuilder append(java.lang.Object)
    class java.lang.AbstractStringBuilder append(java.lang.CharSequence)
    class java.lang.AbstractStringBuilder append(char[]) (r.js#21883(eval)#307)
In module tree:
    ../scripts/main
      app
        text

InternalError: The choice of Java constructor append matching JavaScript argumen
t types (null) is ambiguous; candidate constructors are:
    class java.lang.AbstractStringBuilder append(java.lang.StringBuffer)
    class java.lang.AbstractStringBuilder append(java.lang.String)
    class java.lang.AbstractStringBuilder append(java.lang.Object)
    class java.lang.AbstractStringBuilder append(java.lang.CharSequence)
    class java.lang.AbstractStringBuilder append(char[]) (r.js#21883(eval)#307)
In module tree:
    ../scripts/main
      app
        text

My guess is that the optimizer was unable to realize that the 'text!core/ui/text/form/LoginForm.txt' text dependency used a plugin.

What I wanted was inline resources, I’ve been following the tutorials to the letter and I have all the latest versions of all libraries.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:47:17+00:00Added an answer on June 17, 2026 at 9:47 pm

    It appears the Rhino tool has problems understanding the text! plugin when compiling with r.js

    I switched to Node and everything works perfectly.

    For others who may encounter the same problem, simply go to the nodejs website and download the windows installer (I am using windows). Once installed restart your computer, and you can use node r.js -o app.build.js as explained on the requirejs website.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a java ee project which has a text file that uses a
I have a project ongoing at the moment that uses dynamic text blocks to
I am building a GUI for my final project. This project uses pugixml as
I use This to create a Config file generator, in other C# Form project
I'm linking a text file into my project by adding it to the resource
project have 4 drawable and layout folder(xh,h,m,l). this is part of manifest: <uses-sdk android:minSdkVersion=8
I've got a Visual Studio Setup Project that uses the msiexec.exe file to create
I am developing a project and uses HTML files (not JSP or any other
I am working on a project that uses a lot of fetching of text
Is there a way to search a project for all uses of some text,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.