Category "node-modules"

How to mock a 'request' node module for testing in jest

I am new to writing test cases in jest and i wanted to test 'mark' function and want to mock 'request' node module. let's say this file's name is app.js and tes

tried to update angular to 13 broke a bunch of stuff now trying to go back to angular 11 how to?

First I am the only one working on this project so we can completely nuke everything but the code of course. I have tried things like this with no effect npm un

React native crypto stream module is undefined

I'm giving a try with [react-native-crypto][1] in order to learn how to convert nodejs to be used in React Native project in the future. Unfortunately, I couldn

Best practice for configurable React component/component library

I'm working on a React component library and I'm trying to figure out what would be the best way to make it configurable. I'd want to achieve something similar

Jest Runner won't allow me to debug tests just skips test each time

skipped test When pressing debug on the test it just skips it. It works for other tests in different repositories that I have, but for this specific one it does

Node-gyp fetches headers from internet – not allowed because of firewall rules

I am trying to setup a simple node app in docker. The app needs to install npm package ibm_db. In that installation of ibm_db, node-gyp wants to download header

I found 404 Not Found when I installed npm package from local directory even packege exist in nodemodules

I installed a npm package from a local directory. The package installed and is present in the node_modules directory. But when I access the package it’s s

When i try to npm install or npm install <any-package>, i see "Cannot read properties of null (reading 'edgesOut')" and İ have package.json

When I try to npm install or npm install, I see "Cannot read properties of null (reading 'edgesOut')" and I have package.json I add screenshots, please help me,

Angular npm start it is generating browser application bundles although the app is not in production

I am dealing with an unexpected change at the npm start which it makes the server of Angular very slow. During npm start it is coming Generating browser applcia

Getting the error "Next.js unmet peer dependency error " when installing next.js app

So , when I'm trying to create a new Next.js app using npx create-next-app@latest todo-app command , I get this following error while It's being installed : "e

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in the package.json of a module in node_modules

This is a React web app. When I run npm start This error occurred > [email protected] start > react-scripts start node:internal/modules/cjs/loader:488

Yarn berry installs node_modules

node.js version: 16.14.0 yarn version: 3.1.1 macOS: 11.6.4 (Big Sur) I set up and continue to work on a yarn workspace project. I committed all files including

Javascript, using require() and import in the same file

I need to use require() in my file so I can use 'readline', but I also need to use import so I can use a module. But when I use require inside of my module it s

Tailwind with Angular 13

when I run : ng add @ngneat/tailwind I got this error: An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID !!!!!! VSCode. An

How to make the `import` statement work properly inside the code created using the node:vm module?

In our project we have the custom console object which is used as a logger. So we need to replace the default console. For this purpose we decided to use the vm

How can get chat history of users in botpress?

I am working on Botpress chatbot. I need to send an email with a current user chat history. I have no idea how to achieve this. Version using: Botpress V12.2.0

npm install returns syscall spawn git error

I've tried to run npm install and faced these issues below I've tried to clear cache with force command, install git and update node but nothing worked here i

does npm node-cache value can be set in one file and access in another

i am working on a nodejs app where i have to maintain an api token for 24hr and then refersh it, currently i am writing that token on json file in every update

SyntaxError: Cannot use import statement outside a module

I've got an ApolloServer project that's giving me trouble, so I thought I might update it and ran into issues when using the latest Babel. My "index.js" is: req

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