Skip to content
Advertisement

Tag: require

Unable to resolve module [external url] within the project or in these directories: node_modules

Im doing a project in react native I have an object of exercises that include images and videos, everything is fine when the object was created, but when I imported into another file I get this error undefined Unable to resolve module https://assets.soysuper.fit/cutted+mvp+mp4s/bodyweight_squats.mp4 from /mnt/c/Users/USER/Documents/superfit/app/src/screens/Patient/Workouts/ExercisesList.ts: https://assets.soysuper.fit/cutted+mvp+mp4s/bodyweight_squats.mp4 could not be found within the project or in these directories: node_modules This is

for what “../..” used for? I found it today in this line var express = require(‘../..’);

Hey I was trying to understand node-js routes and found this sentence “var express = require(‘../..’);” I don’t understand the meaning/usage of ‘../..’ here please can someone explain it to me? Answer ‘../..’ is a relative path to index.js file which is situated two folders behind. Let’s say hypothetically your folder structure looks like this – and your-code.js looks like

List javascript urls of a page

is there a way I can extract the list of all the JS imported in a page, maybe via browser console? I’m not looking for only the ones imported via , but also the ones imported by other js scripts. So, let’s say I have a page that is using requirejs, and during the usage of the page, many other

Require non-static image in React Native

I have a special folder with images in my React Native application. Path to these pictures is stored in the special object that is passed as prop to the Card component. So, I can’t use require, because it uses only static path string. How can I use load these images from my props? There is my try: Answer As your

webpack dynamic module loader by require

OK, i have searched high and low but cannot reliably deterrmine if this is or is not possible with webpack. https://github.com/webpack/webpack/tree/master/examples/require.context Appears to indicate that one can pass a string to a function and it load a module… But my attempt is just not working: webpack.config.js The server.js The module in modules/ named test.js But the result is always the

Advertisement