Skip to main content

Questions tagged [require]

In interpreted languages like Lua, PHP and Ruby, "require" is a statement that tells the interpreter to include a certain source-file at that position where the "require" statement has been placed.

0 votes
1 answer
13 views

TypeError: 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 postman: ...
Antônio Souza's user avatar
0 votes
0 answers
62 views

PHP 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 ...
user2969509's user avatar
-1 votes
0 answers
20 views

How 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 (cdv-electron-...
nick zoum's user avatar
  • 7,327
1 vote
0 answers
67 views

Could not find a declaration file for module 'jsonwebtoken'. -pathname- implicitly has an 'any' type

I was working on a backend project, using node.js and express.js. I need to use the json web token, after installing it via npm i jsonwebtoken I get in my node_modules. The problem is this when I ...
NITIN RAI's user avatar
0 votes
0 answers
74 views

require() empty string id error on non-empty strings

When I try to run my js code there appears to be an error that shouldn't exist no matter what. Basically i loop through an array of strings (paths), i try to import an object (using require) using ...
Bogdan Maxim's user avatar
0 votes
0 answers
46 views

webpack [Uncaught ReferenceError: require is not defined]

I recently started learning webpack and ran into the following problem. I have a configuration file webpack.config.js const path = require("path"); module.exports = { mode: "...
Scripton's user avatar
0 votes
0 answers
63 views

Unresolved requirement: Require-Bundle: org.eclipse.ui

I have an RCP application in eclipse. That works into eclipse, but when I export it, I have this stacktrace !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve ...
Alvaro ZG's user avatar
0 votes
0 answers
18 views

How to create a NPM package installed globally to run code from terminal with node js?

I created a javascript with node to rewrite javascricp file to make all require to import and my code do it perfectly. My NPM package is named require2import. it's here on Github. If run my script ...
Gino's user avatar
  • 1,853
-1 votes
1 answer
50 views

How do I use dotenv with import in javascript

I want to use dotenv via node.js I already tried with "require" but the browser does not support it. On the documentation it is advised to use import with ES6, which I did but there are ...
Lolow Anssyto's user avatar
0 votes
1 answer
22 views

in VS code can I see the value of a variable that is included from another file?

I'm doing a bit of cypress automated testing but this question is probably more flat out js or vscode. I have an object in a file that I export like this const ui = { profile:{ details:{ ...
samantha's user avatar
  • 223
0 votes
0 answers
51 views

require 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 instead I want to import ...
Motiur Rahman's user avatar
0 votes
0 answers
28 views

PHP Customization using child class pattern

I am creating a system which manages projects. Each projects' behaviour can be customized by custom PHP class called c11n, that the project's owner can create by extending my parent c11nBase class. It ...
Lukáš Řádek's user avatar
0 votes
0 answers
31 views

require() error on node.js hosted with Plesk

I'm using Plesk to host a node.js app. In local theres is no problem, but when I upload the files, node cannot find one of my files. I have the next in my app.js const express = require('express'); ...
Víctor Martín's user avatar
0 votes
0 answers
68 views

'socket.http' module isn't found when using require

So I am trying to make a lua script that use "socket.http" but it seems to be missing some dlls or .lua and i'm trying to understand how I would be able to add them into the same folder as ...
Duxii's user avatar
  • 1
0 votes
1 answer
30 views

Passing images loaded from dynamically-built `require` URLs through props in React components

So I'm building out a simple restaurant app in React and have a series of .jpg images. In my Specials.jsx component, I've built an array of objects whose properties include image. I then map over this ...
Joseph Brockly-Anderson's user avatar

15 30 50 per page
1
2 3 4 5
214