Questions tagged [npm]
npm is the package manager shipped with Node.js. It can be used to install and publish CommonJS and ECMAScript modules, jQuery plugins, reusable JavaScript code (libraries), JavaScript-based CLI programs, and more.
50,290
questions
-4
votes
0
answers
34
views
When I run any npm command I get error Cannnot find module
I have got latest npm installed.
When I run any npm command like npm install --global sfdx-cli. Get below error:
module.js:550
throw err;
^
Error: Cannot find module 'node:path'
at ...
-4
votes
1
answer
447
views
How to run a folder of angular from a project
enter image description hereWhen I give ng serve command from the directory it does not run and returns back to the directory.
How can I run angular project
-4
votes
3
answers
671
views
npm ERR! notsup Unsupported engine for @nestjsi/[email protected]: wanted: {"node":">=16.0.0"} (current: {"node":"14.19.3","npm":"6.14.17"})
When building a Dockerfile I get:
npm ERR! notsup Required: {"node":">=16.0.0"}
npm ERR! notsup Actual: {"npm":"6.14.17","node":"14.19.3&...
-4
votes
2
answers
146
views
Why some libraries in simple vanilla Js require NPM?
I am pretty new to js. And I am looking to learn js. Recently I came across one library called bounce.js which is animation library. Which require NPM to install but why? I am dont want to use NPM (or ...
-4
votes
2
answers
62
views
How to get fixed amount of documents from mongodb?
Now my code is returning all the news related to a company. But I want only the first 15 elements. How to do this? Here is the code which returns all the news for a company. google-news-json is a npm ...
-4
votes
1
answer
601
views
What's the best way to use Node Sass on Windows in 2022? Error: 'Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0'
I am having issues installing SASS with create react app. Is there any windows specific practice?
I tried:
npm install --save-dev node-sass
I also uninstalled then re-installed.
Here are the error ...
-4
votes
1
answer
76
views
Is there a library to get a calendar in react? [closed]
hope you all are having a great day.
I need an interactive calendar like this in one of my apps
I was wondering if there's a library in react that can help me achieve this
-4
votes
1
answer
3k
views
How can I install nodemon on windows 10?
I am using the bash console in windows 10. I am using node.js and I want to install nodemon, but I get this:
sudo: npm: command not found
and I'm supposed to have npm
-4
votes
1
answer
47
views
How to test an HTML page with jQuery DOM manipulations
I was asked to develop an HTML page with jQuery DOM manipulations - e.g., when I click the submit button, a success/error message is displayed - and to test them. I'm used to do such a things with ...
-4
votes
2
answers
2k
views
Yarn install gives error on installing node-forge module
When I am running yarn install I am getting this error:
error https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz: Extracting tar content of undefined failed, the file appears to be ...
-4
votes
2
answers
3k
views
find cities and country name from string
I have cities and countires list in a json file. For a given string, I need to check the city name and country name is present or not. If present I have to capitalize the word. what is the best way ...
-4
votes
1
answer
57
views
How to create a custom command utility
I want to create a custom command in node.js, like create-react-app please share me the details,if i run that command in node terminal it should create some directroy and files like create-react-app ...
-4
votes
2
answers
1k
views
How to install react-native?
I'm trying to install react native through npm, and I've got a mistake in the console
Air-Anton: ant anton$ npm i -g create-react-native-app
npm WARN checkPermissions Missing write access to
/usr/...
-4
votes
2
answers
2k
views
Ionic: package.json missing start script
My package.json doesn't have a start script, so npm start will not work.
My package.json looks like
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://...
-4
votes
1
answer
61
views
How to build react components css
I developed a component using react, Use babel to build into the lib directory.
But my css I do not know how to build it, I need help Thanks.
My Code:
"scripts": {
"build": "./node_modules/.bin/...
-4
votes
3
answers
781
views
'fs' module not showing immediate effect, need to restart the server
Its a NodeJS project. I am using npm start to start the server.
In this project, I am reading files of a folder "./mydir/" using 'fs.readdirSync', pushing files in an array and printing on console.
...
-4
votes
1
answer
151
views
php -S localhost:8000 not running in node.js
I have installed NPM and bower globally as well as gulp and I am trying to run the following command on a windows machine:
php -S localhost:8000
Its saying php is not recognized as an internal or ...
-4
votes
3
answers
1k
views
Array.push not pushing properly
EDIT: I've added the res.send(json), wasn't included the snippet.
I'm trying to extract/scrape a website and combine their output into json data. However when I run the endpoint, the response ...
-4
votes
1
answer
3k
views
How do I install node packages on sublime text
I was just wondering if it’s possible to install node packages from sublime instead of the command line. And if it is how do I go about it
I don’t mean package control, I mean installing npm ...
-4
votes
1
answer
223
views
How to save header in NODE.JS?
I am new to NODE.JS
Can anyone help me? When I run the following command:
npm install --save express-handlebars
It gives following error:
+ [email protected]
updated 1 package and audited ...
-4
votes
2
answers
149
views
ReactJS - Without changing URL switch between multiple components
I have three components, we should have to switch between back and forth within those components.
Eg: React-Stepzilla
Note : Need to work without wizard like npm modules
-4
votes
2
answers
933
views
npm run dev doesn't work
enter image description hereI run npm run dev but I get this:
0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program
Files\nodejs\node.exe', 1 verbose cli 'C:\Program
Files\nodejs\...
-5
votes
2
answers
4k
views
I am unable to install @angular/CLI package
npm ERR! 404 Not Found: @angular/CLI@latest
**
log:
**
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\...
-5
votes
1
answer
3k
views
Node.js npm error on windows command line
I have installed node.js through windows installer.
When i try to execute npm command in the console the below error getting printed.
Please guide me to install it properly on windows 7 32-bit ...
-5
votes
1
answer
42
views
How to fix this in on creating react app npm ERR! enoent spawn pwsh.exe ENOENT
I am trying to create react project then suddenly on creating react app this come and says that pwsh.exe spawn i reinstalled node js and vs code even put the path on the environmental variable but ...
-5
votes
1
answer
73
views
how to create a sha256 from an object in javascript? [closed]
https://www.npmjs.com/package/object-hash
This package only supports SHA1.
Is there any other way that can work to create the SHA256 from an object?
-5
votes
1
answer
61
views
Build tools and/or Package managers : Stucked Seriously
With due respect to everyone,
I'm a little confused in using GruntJs...
(the question aroused when i found Autoprefixer could help my life with those damn vendor prefixes but that's where things got ...
-5
votes
1
answer
968
views
how to install cordova,Ionic installation on yosemite(mac)
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.2","...
-5
votes
1
answer
53
views
When I try to set up Next.js app it shows me NPM ERR
When trying to set up a new app using npx create-next-app@latest it shows me the error:
npm ERR! code EJSONPARSE
npm ERR! path C:\Users\user\AppData\Local\npm-cache\_npx\cc2145a2fe1558fa/package.json
...
-5
votes
1
answer
254
views
npm ERR! Installing firebase to angular
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@...
-5
votes
1
answer
431
views
storing variables in webserver with nodejs and express [closed]
i'm trying to create a web server that saves variables to a webserver on each situation, due to caching is it possible?,
like res.send(data)
i'm trying to make something like webdb(not sure if works)
...
-5
votes
2
answers
167
views
npm start problem: npm ERR! code ELIFECYCLE
I've got some problem with starting app by using 'npm start'. After create react files folder and using that command I can see:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ...
-5
votes
2
answers
276
views
Npm Package Install Problem (found 23 vulnerabilities)
I tried to install the package. But I saw this error.How to solve this problem ?
-5
votes
1
answer
999
views
Trouble installing NodeJS on Kali Linux docker image
I am trying to create a docker image based on the Kali Linux base image, and I need to install NodeJS as a dependency for my application.
Here's my Dockerfile:
FROM kalilinux/kali-linux-docker
RUN ...
-5
votes
2
answers
291
views
why I can't install socket.io
there always an error on the console , what's going on?
npm ERR! code 1
npm ERR! path E:\full-stack\proshop-2\socket\node_modules\utf-8-validate
npm ERR! command failed
npm ERR! command C:\WINDOWS\...
-6
votes
1
answer
12k
views
How to install Lodash [duplicate]
I'm new to lodash and i've have installed lodash as
npm i --save lodash
and im calling it in my index.js file as
import _ from 'lodash';
However this is not working and its displaying the error ...
-6
votes
1
answer
117
views
Require stack: \\ Error I've never heard of
throw err;
^
Error: Cannot find module './C:\Users\domri\OneDrive\Desktop\Repositories\Discord Bot\commands\test/ping.js'
The error is found somewhere in here
const isDirectory = source => fs....
-6
votes
1
answer
577
views
npm start giving error in nodejs
//These are the error log details
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\SamiUllahJan\AppData\Roaming\npm\...
-6
votes
1
answer
40
views
NPM command arguments
Sorry I'm newbie in Nodejs and NPM, and I use this command (npm install -g ..) for What I need to install, OK after googled I couldn't figure it out what does -g do in NPM command or basically what ...
-7
votes
2
answers
853
views
Installing Cordova - npm ERR! registry error parsing json
I am trying to install Cordova, but always getting this ERROR
npm ERR! registry error parsing json