Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
25 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 ...
Shankar Patwardhan's user avatar
0 votes
0 answers
34 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/...
sri harsha's user avatar
0 votes
0 answers
43 views

How to implement the view layer for a custom Akeneo PIM bundle?

I'm writing a (Symfony 4) bundle for Akeneo PIM Community Edition v5. It's supposed to retrieve product stock data from an external instance (via REST API) and to display this data in the products ...
automatix's user avatar
  • 14.4k
1 vote
0 answers
32 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, ...
Orlando Aleman's user avatar
-2 votes
1 answer
428 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 ...
xkeshav's user avatar
  • 53.9k
0 votes
2 answers
113 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 ...
Bhavya Shah's user avatar
0 votes
0 answers
15 views

What is the ES6 module equivalent of requirejs-text for dependencies on text resources?

I use requirejs-text to load a text resource as a dependency of my module. This makes it so I know the text resource (i.e. the text contents from a url) is loaded and available by the time my module ...
Don Hatch's user avatar
  • 5,331
-1 votes
2 answers
115 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
78 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
32 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
47 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.html', '...
Gamayazu's user avatar
0 votes
0 answers
22 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
1 vote
0 answers
173 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
  • 11
0 votes
1 answer
190 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
16 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
27 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,205
0 votes
0 answers
68 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
26 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
764 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
  • 377
0 votes
0 answers
183 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
47 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
808 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
0 votes
1 answer
84 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 ...
Drivers Sea's user avatar
0 votes
0 answers
71 views

How to use RxJs with Require.JS

I try to use RxJs with Require.JS on Html page (without Angular or WebPack), this is my test <script src="http://requirejs.org/docs/release/2.3.6/comments/require.js"></script&...
Viacheslav's user avatar
  • 1,300
0 votes
0 answers
36 views

Why jest.spyOn doesn't invalidate module cache when requiring single function?

I have // mod1.js const f = (_n) => console.info('a:', _n) || _n * 2 module.exports = { f } // mod2.js const { f } = require('./mod1') const g = (_n) => 3 * f(_n) module.exports = { g } and a ...
alain's user avatar
  • 165
0 votes
0 answers
158 views

Cypress + RequireJS: How to ESM import define from RequireJS?

I am working with cypress.config.ts for Cypress Testing I am receiving Invalid Config Reference Error: define is not defined Error: ReferenceError: define is not defined at file:///../cypress....
Harbinger24's user avatar
0 votes
1 answer
388 views

Flutter web project with javascript modules that use requireJS (Monaco editor in Flutter web)

I'm trying to use the Monaco editor in Flutter Web. The simplest way that I see is to sync load all the resources example. Here's a stand alone html file: <!DOCTYPE html> <html lang="en&...
user3103070's user avatar
1 vote
0 answers
53 views

Unable to resolve "../assets/srt/Audio2.srt" from "components\PlayerSound.js", how can I fix it?

I'm working on a react native project with expo. My app will display a video and I want to display subtitles with it. I got multiples videos and srt files so I don't use the subtitles module of expo-...
Arhkaz's user avatar
  • 11
0 votes
0 answers
35 views

Require independent instances of module inside class

I am a beginner in nodejs. I am developing a vscode extension based on this guide. I defined a class that requires an external js module, e.g. : thepanel.ts: import * as vscode from "vscode";...
Oliver Lopez's user avatar
0 votes
1 answer
220 views

Form Navigation in Temenos Quantum Visualizer

How do we navigate between different forms using pure coding only? And should I use the respective Form Controller to write its code? I can easily implement this with the help of the user interface ...
M. Hayyan Ali's user avatar
2 votes
1 answer
2k views

Why the import * as fs from 'fs' doesn't work and gives me an error?

So this is my problem: import * as fs from 'fs'; var downloads = 0; const fs = require('fs') fs.readFile('tp.txt', (err, inputD) => { if (err) throw err; downloads = inputD.toString(); })...
Sadra's user avatar
  • 41
1 vote
0 answers
782 views

Debugging Uncaught Error: Mismatched anonymous define() module: undefined

I use Magento 2 and requireJs optimiser and quite often can run into below error after creating my bundles and visiting my storefront: Uncaught Error: Mismatched anonymous define() module: undefined ...
harri's user avatar
  • 554
1 vote
0 answers
327 views

Uncaught ReferenceError: require is not defined error while running react app

My react application is not getting properly loaded and when I open browser console it is showing below error- external node-commonjs "events":1 Uncaught ReferenceError: require is not ...
Swami Mahale's user avatar
1 vote
0 answers
225 views

The application compiled using pkg in Node.js does not recognize the files added to the project folder. What should I do?

I need to be able to add new .js files to the /public/bots folder after compiling my project into an exe file using the pkg module. Upon launching the application, these new files should be detected, ...
npc-100lvl's user avatar
1 vote
0 answers
88 views

How can I Display data labels with Chart.js using RequireJS

I am hoping to keep things simple by storing the required files on the server hosting my webapp. I am using the latest version of Chart.js and the data label plugin. The data label file is in the same ...
Damian_W's user avatar
0 votes
1 answer
61 views

Check what files are in a directory using js in .html file

I am trying to figure out how to read what how many/what files are located within '../mydirectory/images' in a .html file that I have that is the landing page for my website. I need this so I can ...
Wx_Trader's user avatar
0 votes
1 answer
732 views

How to solve Uncaught ReferenceError: require is not defined

Problem I'm working on migrating my product information from Magento to Shopify, and one of the field is an entire HTML document. While the HTML and CSS can be correctly display, the jQuery codes in &...
Ariel's user avatar
  • 3
0 votes
0 answers
35 views

JSON variable inside the require.js block is not accessible outside the require.js block

I am working on an developing a data source object (called data variable in my program) based on Solr queries using require.js My goal is to pass the data variable to an API that I am developing, ...
wthrajat's user avatar
0 votes
0 answers
21 views

How use node_modules when textisolation true?

I am currently making an application with Electron but when I package my application I have a white screen when I set the parameter textisolation: true. But when I set it to false my modules like ...
balake56's user avatar
0 votes
0 answers
171 views

Using require with webpack in my Chrome Extensions blocks my async calls

I am building a Chrome Extension that does STT to Google Documents. It works fine, I managed to add some features to it, but now I want to add an option to select some text from the document. For this ...
VladTbk321's user avatar
0 votes
2 answers
718 views

Using Underscore.js with require.js: Uncaught ReferenceError: _ is not defined

I have Underscore.js 1.13.2 and I include it using requireJS 2.1.14. paths = { 'underscore': my_folder_path + "/underscore", // for underscore.js .. //path of other files } I see in the ...
Arshad Rehmani's user avatar
0 votes
1 answer
980 views

Monaco editor in content script. "Define is not defined", "synchronous require cannot resolve module 'vs/editor/editor.api'."

I'm trying to make it work in content script: manifest.json "content_scripts": [ { "matches": ["<all_urls>"], "js": [ "monaco-...
rigiva's user avatar
  • 11
0 votes
1 answer
86 views

How to use require to execute an IIFE that takes arguments

I know that when you do require('./file') where the file.js export is an IIFE, that function will immediately run (obviously). I'm just not sure how to deal with this if the IIFE takes arguments. I'm ...
Oli's user avatar
  • 1
1 vote
0 answers
1k views

Vite build uses require? Receive error require is not defined

I have an app that uses Vite (runs on electron, using electron builder and the plugin for vite) and I had a single page app and the build/app/etc were working great. But, I needed to add a new page ...
d33p's user avatar
  • 11
1 vote
0 answers
94 views

How do I setup a fallback for Webpack require?

Webpack's require is being used to dynamically load images based on the state of the page. Console Error Uncaught Error: Cannot find module './target.png' at webpackContextResolve (.png$:82:1) at ...
Zach Simmons's user avatar
0 votes
0 answers
27 views

Is RequireJS execution order guaranteed for dependent scripts once their dependency is loaded?

In RequireJS, if multiple scripts have dependencies on a module, are those scripts guaranteed to get executed in the order they are defined once the module is loaded? Basically, with the following ...
Timothy Fisher's user avatar
0 votes
2 answers
424 views

How to correctly load dynamic images in Vue.js?

At the moment I'm just starting to learn Vue.js. I can't solve such a problem, when using "require()" an error appears: "Module not found: Error: Can't resolve". If I use static ...
NVY's user avatar
  • 1
-2 votes
1 answer
150 views

How do I import and export files in javascript?

I created a separate file for a function and exported it to my main file to use by "import Header from "./Header.js";" but it is throwing error that "require is not defined&...
sanikatiwarekar's user avatar
0 votes
0 answers
276 views

Uncaught ReferenceError: Handlebars is not defined when using handbelar.js

I am copy pasting the code from the tutorial here: https://sabe.io/tutorials/getting-started-with-handlebars-js <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"&...
pathikrit's user avatar
  • 33.3k
1 vote
0 answers
458 views

Plyr is not a constructor

I've been struggling for a while to include a Plyr library (read & customise audio src) and I need to embed it via requireJS (important). all the other libraries work except this one, I wonder ...
Bosee's user avatar
  • 11

1
2 3 4 5
155