7,693 questions
1
vote
2
answers
181
views
Including Autodesk Viewer as AMD library in SAPUI5?
It seems like the latest Autodesk Viewer update to version 7.115.0 on November 28 the module has been changed to a Universal Module Definition (UMD).
We are importing this script in the SAPUI5 ...
0
votes
1
answer
107
views
Require.js fails to load data-main script (looks into wrong place)
Requirejs library fails to load script defined in data-main attribute for require.js script. According to browser output it looks into wrong place. Can't sort it out why and how to fix it. Created ...
1
vote
2
answers
136
views
Webpack automatically resolve default import
I am attempting to migrate our single-page application from RequireJS to Webpack. As part of this transition, I am gradually rewriting our hundreds of modules from ASM define() syntax to modern ESM ...
-1
votes
2
answers
166
views
Unable to reduce React app build bundle size
This line of code is expensive to run:
require(`./path/to/large_file`)
Without it, the React app build bundle resulted in 36 MB.
With it, it resulted in 92 MB.
The above line of code is run during ...
1
vote
0
answers
80
views
Ag-Charts 10.2 is Not Loading in Require.JS App
I have a require.js app and I am adding enterprise edition of Ag-Charts in it. I can successfully add 9.0 version of Ag-Charts but when I try to add 10.2 version, it's not loading somehow. Can someone ...
0
votes
0
answers
93
views
require js is not supporting optional chaining at the bundling process (grunt bundler)
Running "requirejs:desktop" (requirejs) task
Error: Parse error using esprima for file:
C:/projects/GitProjects/vendorgames-sonarqube/ndcasinocommon/base_common/fcga
mes/vendorgames/...
1
vote
0
answers
62
views
Migrate a large project using Require.js
I work on a fairly large Javascript project (~863 files), where all the code is distributed in a modular way, being practically one file per class (object-oriented). Some things are loaded on the fly, ...
0
votes
1
answer
1k
views
How do I use both `require` and `import` in a Node.js script?
having a node js basic project setup with package.json , install a package and try to use both require and import statment in the same file; to do that here is what did so far but not working.
First ...
-1
votes
2
answers
351
views
Undefined error while loading Survey-creator-core using RequireJS
I am using requireJS in my project and want to load survey-core and survey-creator-core.
survey-creator-core has a dependency on survey-core when i checked the js file of survey-creator-core.
I got ...
-1
votes
2
answers
190
views
Require JS with jest to mock function in same module
I am working on a NetSuite suitescript customization and would like to write the test with Jest.
Since suitescript run with Require JS, I would like to know how to correctly mock the function as I ...
1
vote
0
answers
440
views
RequireJS Error "No define call for core/first" on Moodle Installation via Docker
I'm working on a project that involves deploying Moodle using Docker. The setup includes two Docker containers: one for the database (MariaDB) and one for Moodle (i also have a container for django, ...
0
votes
1
answer
579
views
Error: Cannot find module '../controllers/userController' in Express.js Application
I am working on a full-stack project using Express.js for the backend and MongoDB for the database. I am encountering an error when trying to start my server. The error message is as follows:
Error: ...
0
votes
2
answers
1k
views
Node.js import results in ERR_MODULE_NOT_FOUND
Here is how I built and installed node.js(version: 20.11):
./configure --prefix=/home/tester/node
make -j8
make install
Here is how I set the environment:
export PATH=/home/tester/node/bin:$PATH
...
0
votes
0
answers
71
views
requireJS element is not a function
simple example RequireJs
I get Error :
Uncaught TypeError: hi is not a function
say.js
define(function () {
var say={};
say.hi=function hi(){
console.log('hi');
}
return say;
});
...
0
votes
1
answer
116
views
I have an error with my singleton design pattern
I am attempting to do a singleton pattern in javascript. I am getting error message "Uncaught TypeError: route_socket.getInstance is not a function". I was wondering what am I doing wrong. I ...
