Category "node-modules"

detect whether ES Module is run from command line in Node

When using CommonJS modules in Node, you can detect whether a script is being run from the command line using require.main === module. What is an equivalent wa

How to install a global npm package using fnm (Fast Node Manager)?

My Problem I have installed fnm (Fast Node Manager) from this github repo and it works all great except for installing global npm packages. For example, the wel

What is the term for a program that consumes a dependency?

I am currently working on an update to a package, which other programs use as a dependency. I'm curious what the correct term is for those dependency-consuming

Nodemon EADDRINUSE error every time I save

When using Nodemon I keep getting the EADDRINUSE error telling me the port is currently in use elsewhere even though it isn't. This error shows up almost every

How to avoid duplication of module "bn.js" in webpack production build?

I used webpack 4 for my app. Somehow, bn.js package takes up a lot in production build. The image shows that it takes up 594.22 KB of data. Is there any way to

The dependency (non-development) of other dependency has not been automatically added to node_modules

I has been told ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin". (The package "@typescript-eslint/eslint-plugin" was not found when loaded a

The dependency (non-development) of other dependency has not been automatically added to node_modules

I has been told ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin". (The package "@typescript-eslint/eslint-plugin" was not found when loaded a

How can i do npm module support import and require?

I uploaded my first module to npm in Javascript and I want it to support import and require. Is this possible? The module is this: https://www.npmjs.com/package

Cannot find module web3

I simply am trying to import web3 to my project and for whatever reason I cannot seem to resolve the issue I am facing. The relevant code is posted below: Examp

Clean AND practical way to handle node_modules in a Dockerized Node.js dev environment?

I have been trying to dockerize (both for development and later for production) a MERN stack application recently, and the interaction between Node.js (more esp

How to install node.tar.xz file in linux

I recently downloaded the Nodejs file from the official site and I don't know how to install the Nodejs from a archived file. Please help me how can I install t

Appending .js extension on relative import statements during Typescript compilation (ES6 modules)

This seems to be a trivial problem, but it is not very obvious what settings/configurations need to be used to solve this issue. Here are the Hello World progra

Node projects are not working after changing the node version

I have node version 14 and all my node projects are working fine in node 14, but when I installed node version 16 and trying to run existing node projects, exis

What dependencies should be in to devDependencies in React on production

I'm having a problem with the size of node_modules so I'm trying to reduce it as much as possible so my solution right now is to put unused depencies on product

Install node_modules inside Docker container and synchronize them with host

I have the problem with installing node_modules inside the Docker container and synchronize them with the host. My Docker's version is 18.03.1-ce, build 9ee9f40

Metro Has Encountered an error: Cannot read properties of undefined(reading 'transformfile'). ERROR

Not sure Why I am getting this issue. I am following a react-native tutorial, and am experiencing this error: TransformFile(filePath, transformOptions) { va

Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51

I am running a node application on terminal. Have recently upgraded to node v8.5.0, but am getting this error: Error: The module '/tidee/tidee-au/packages/tide

Passing "global" and "ignore" options to browserify via the command line

I'm using browserify with babelify to transpile a JS file. The JS file require()s a component in node_modules, which I also want transpiled. As per the FAQ on

how to send variable along with the redirection in nodejs?

#Following in my code for redirect along with variable in nodejs app.post("/newcall", function(req, res) { var f = (req.body.try); console.log("val"+ f) r

Error: Cannot parse config file: '" + fullFilename + "': " + e3

I just want to set environment form development,staging and production in my project of express.js To set these environments I use module config https://www.npm