365体育足球滚球比分

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.

Filter by
Sorted by
Tagged with
-1
votes
0answers
15 views

How we can write json object to .json file with Javascript? [duplicate]

How can I write a json object to a .json file with JavaScript? I tried to use require (module fs) from nodeJS, but I get a browser error ( require is not defined ). How can I fix this problem ...
0
votes
1answer
19 views

Rails, gems, require, zsh and an error message! I can't load my app because of an issue related to “require”

So, I tried to repair something that was not working related to my ZSH file, which I managed to do, but ended up breaking some other stuff apparently :/ Anyway I am trying to run my app locally (...
5
votes
2answers
51 views

Behaviour of require (static + dynamic) [ RAKU ]

My question is related to the behaviour of require when used with static or dynamic resolution of the desired namespace. I'll try to present my understanding of things: [ 1 ] Use "require" with a ...
1
vote
1answer
13 views

How To Use Paypal Payout PHP API

I'm using PHP and I want to send money to users who have sold their products on my platform. For this I'm trying to use Paypal Payouts, I've found this link here with an example code for a single ...
0
votes
0answers
9 views

require (native electron addon) hangs if screen is locked

I have an app written in electron. The renderer does a require on a native addon that I wrote in C++. Works great. However, I have recently discovered that, if the (linux) desktop session is locked (...
0
votes
1answer
17 views

How pass arguments via require to material avatar

import Avatar from '@material-ui/core/Avatar'; This code works: <Avatar alt="user 4" src={require('Assets/img/user-1.jpg')} className="size-80 rounded-circle border-info rct-notify" /> But I ...
0
votes
0answers
20 views

NodeJS How to compile, run and determine dependencies from javascript code in a String?

I have a need to require() (compile and run with all dependencies) a javascript file which is already in a string in memory. Once required and run, I would somehow like to get hold of all ...
0
votes
0answers
7 views

Node require equivalent in es-next require().default

When I read the d2admin, i found an elegant way of importing vuejs-sfc files as yo can see in the below : const _import = require('@/libs/util.import.' + process.env.NODE_ENV) module.exports = file =...
0
votes
0answers
24 views

Reload php file retrieved with 'require' on every function call

Inside a server-side PHP script, called via an AJAX Request #1, I'm requiring a PHP script A, by using the require statement. On the page on from which that AJAX Request #1 can be fired, I also ...
1
vote
0answers
34 views

I get “ReferenceError: Can't find variable: require” running a Cordova app on osx

I am trying to develop a Cordova based app that uses the ytdl-core node module. From my understanding, Cordova uses node-js for running the app on osx (or other non-browser platforms). The app builds ...
0
votes
0answers
16 views

Cheerio, getting 403 when scraping

I tested the code a few times using specific links on each step, and it worked, I don't know if there is some sort of mechanism preventing the request (it's my first time trying scraping/cheerio) Now ...
0
votes
1answer
24 views

link-tag and src-tag vs. include/require for external files

what is the best way to add for example a css-file to a webpage or are there any differences between link-tag and require/include? The reason why I'm asking: My idea is to identify my root folder and ...
0
votes
1answer
18 views

How to include module class inside a rake task?

In rails 4 app, I am trying to create one rake task. I am trying to include a module feature for it but its not working. Module file is (/app/models/concerns/user/tags.rb), module Concerns::User::...
1
vote
1answer
20 views

Failed opening required file?

I have a file with a simple text output. I want to include this file in another PHP file. When I try to require the file with: <?php require_once ("info.blade.php"); ?> I get the error: ...
0
votes
0answers
24 views

Why does this import() promise get rejected while require() works fine?

My code is as follows: 'use strict'; import('mysql').then(result => console.log('then')) .catch(error => console.log('catch')); console.log(require('mysql')); When I run node thisScript....

15 30 50 per page
1
2 3 4 5
188