Require JS Object and Functions in Typescript Angular2 project
I am working with Typescript2.1.5 and trying to write some newer sections of code with it.I have a JSlibrary that I am not ready to update in Typescript. The problem is that I need to consume some of...
View ArticleTrying to import KcAdminClient
I’m trying to use the Keycloak Admin Client library in my Nodejs (Typescript) application, but there's a problem about ES6/CommonJs stuff, which I never really understood (import vs require and mixing...
View ArticleWhy do I have an error in require node js?
I'm trying to run some node.js code, however I get this error that module express doesn't exist. And it seems that require keyword is the one that is raising the error: (File is a CommonJS module; it...
View ArticleHow can I require the electron module from within cordova's renderer process?
I created a plain cordova-electron application using this tutorial.I am trying to access the ipcRenderer object of the electron module so I can receive events sent from the main process...
View ArticlePHP 8.3 on IIS 10 can't get document root set properly
I'm stuck on migrating old website to new server and the problem is on "include" or "require".Website is on h:\www and doc_root and include_path in php.ini are set to h:\www.If I include a file in...
View ArticleUncaught ReferenceError: require is not defined in dist folder
I was doing a short project on real time-chat, everything is working fine in development mode, but when I build the distfolder for deployment,It doesn't workIn my code there is no CommonJS code, as I...
View ArticleReact Native: require() with Dynamic String?
I have read several posts about issues that people are having with React Native and the require() function when trying to require a dynamic resource such as:Dynamic (fails):urlName =...
View ArticleUncaught ReferenceError: require is not defined in dist folder
I was doing a short project on real time-chat, everything is working fine in development mode, but when I build the distfolder for deployment,It doesn't workIn my code there is no CommonJS code, as I...
View ArticleTypeError: Job.create is not a function
I'm using sequelize in my project, and importing the Job(variable connected to the database) from the models folder, but when I use Job.create it returns this error when inserting data into...
View ArticleMy js script uses 'require', which I can't use in browser. Will changing to...
I am setting up a webhook receiver just to learn the ropes. I have run a number of tests that work fine with node. Now I am attempting to put this receiver on a publicly hosted page so that I don't...
View ArticleCan't find variable: require at global code@
I'm new to JavaScript and was trying to import the Google Gemini library to use its AI. However, I'm facing an issue when I use the "require" keyword:ERROR: Can't find variable: require at global...
View ArticleAnalog of __non_webpack_require__ for Vue Cli
I need to load some metadata at startup and when working with webpack I used __non_webpack_require__, but the Vue Cli does not know such a method. Is there an analog that does not package the specified...
View ArticleCannot find module error in Node.js: Module not found due to incorrect path...
I'm working on a Node.js project and I've encountered a Cannot find module error when trying to require a module. The error looks something like this:Error: Cannot find module ''I tried requiring the...
View ArticleCommunicating global variables in Lua
I'm coding an inventory system in Computer Craft and I'd like to know if it would be possible to make a file edit variable that it doesn't exactly know about...Here's my file structure:root\ inv.lua...
View ArticleEmacs error when loading a created file into .emacs
GNU Emacs 28.2I have created a file print2Buff.el, when starting to learn writing an emacs extension in the directory~/.emacs.d/extensions/In the init file, I write:(add-to-list 'load-path...
View ArticleHow to tell rpmbuild to install package A only when packages B C D are not...
I try to build an RPM package on RHEL8 with rpmbuild version 4.14.3.This package shall have a dependency, that at least OpenJDK 1.8.0 is installed.This OpenJDK 1.8.0 shall not be installed if...
View ArticleCompiled with errors when a Vue3 application uses dynamic imports to load...
I am working with a Vue 3 project using TypeScript and SCSS. When I dynamically import components using require, Webpack fails to compile, throwing errors related to SCSS files being loaded multiple...
View Articlerequire is not defined in ES module scope, you can use import instead
I got this errer messages when using require:const ideasRouter = require('./routes/ideas'); ^ ReferenceError: require is not defined in ES module scope, you can use import insteadI want to import...
View ArticleIssue with hardhat test
I am learning solidity and here I encountered some test error.I was running script test using hardhat npx hardhat test.This error was producederror Error [ERR_REQUIRE_ESM]: require() of ES Module...
View ArticleWhat are the `node:fs`, `node:path` etc. modules?
Recently, while using a linter, I discovered that the names of some built-in packages where prepended with node:. I searched a lot but I didn't get any useful info. What is this node:module syntax?
View Article