Skip to main content

Questions tagged [requirejs]

RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node.js. If you are using the require call that comes bundled with Node.js then you are NOT using RequireJS. Please do not use this tag for such cases. Use the require tag instead.

requirejs
-1 votes
0 answers
20 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 ...
Steven Chao's user avatar
0 votes
0 answers
25 views

Magento 2, RequireJS: r.js cannot parse ES6 syntax

I am maintaining Magento 2 store. Since we have issues with RequireJS preformance, I decided to try optimizing following this tutorial Advanced JS bundling. I have problem on "Run the r.js ...
dev's user avatar
  • 23
0 votes
0 answers
13 views

Jquery and Jquery UI update

i have Jquery 1.9.1 version and Jquery UI 1.10.3 and Require.js 2.1.5 in our currect project. i want update this file into our project i just replace those files into latest files like Jquery 3.7.1 ...
Sunil Suni's user avatar
0 votes
0 answers
38 views

Can't use imports with "text!" prefix in my angularjs/webpack application

I'm working on a big and complex angularJs app, and i'm migrating it from Gulp to Webpack. I'm facing a problem that i couldn't solve, basically i have some imports like "define(['text!./Page....
Gamayazu's user avatar
0 votes
0 answers
11 views

Global function in external JS file not accesible in magento

I develop a chat widget application that allows customers to add our small widget script in their website and inturn allows website visitors to chat with customer support executives(similar to ...
Aishwarya's user avatar
  • 302
0 votes
0 answers
57 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, ...
Ramon15's user avatar
0 votes
1 answer
49 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: ...
furb's user avatar
  • 1
0 votes
0 answers
8 views

Make a CommonJS module in random folder use the node_modules of the main module

I have the following two JS files: /folderA/a.js require('/folderB/b.js'); /folderB/b.js require('ws'); The ws module is located in /folderA/node_modules/ws, hence the b.js fails to find it. I was ...
Dinko Ivanov's user avatar
0 votes
0 answers
22 views

How to use react-admin with require?

I'm trying to make a CRUD system for XWiki objects and I'd like to use react-admin for it. Here's how XWiki docs say we can integrate libraries into XWiki: How to integrate React and XWiki?. Or here's ...
KulaGGin's user avatar
  • 1,131
0 votes
0 answers
26 views

Uncaught ReferenceError: require is not defined in Angular 13

Getting this reference error after running the project (Check the link) While debugging it is pointing to this particular function (Check the link) I have tried removing the require function but still ...
Beingcoder's user avatar
0 votes
0 answers
15 views

Can I use mantine UI in requireJS?

I have a project using ReactBootstrap like this in requireJS "ReactBootstrap": "vendor/react-bootstrap.min", If my understanding is correct, I would need a .js file in order to ...
Airborne STD's user avatar
0 votes
2 answers
301 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 ...
張俊芝's user avatar
  • 357
0 votes
0 answers
123 views

Magento2 : How to add custom validation to the dynamic rows created using UI component

I am creating a dynamic rows in admin form using UI component. I want to add validation as such on selection of the Type dropdown check if the Test1 text field is blank or not. If blank than show the ...
Prats's user avatar
  • 1
0 votes
0 answers
35 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; }); ...
ashrf glal's user avatar
0 votes
0 answers
472 views

Webpack warning "the request of a dependency is an expression" goes away using template strings instead of variables. How?

I had a webpack warning in my nextjs dev server saying Critical dep: the request of a dependency is an expression This was because I imported some modules using variables, but the warning got away ...
avikt's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
516