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,219
questions
0
votes
0
answers
7
views
get error in installing next@canary npm error peer react@"19.0.0-rc.0" from [email protected]
I have problem with enable ppr in nextjs 14
i got some error in installing next@canary
i try to install next@canary
npm i next@canary
npm error code ERESOLVE
npm error ERESOLVE unable to resolve ...
0
votes
0
answers
9
views
Can't startup expo project from terminal on my Mac
Command prompt npx create expo-app
returns this error:
npm ERR! could not determine executable to run
npm ERR! A complete log of this run can be found in: /Users/baguma/.npm/_logs/2024-07-...
-1
votes
0
answers
12
views
Getting net::ERR_ABORTED 404 (Not Found) at http://localhost:5173/@vite/client in vite project
I have set up a Vite project for vuejs, following the quick start guide to learn the workflow of application development. However, upon launching the app on chrome (or any other browser for that ...
0
votes
0
answers
23
views
running npm in jenkins gives different output
I made a pipeline where the script would clone a git repo and build the application in server where jenkins was hosted . I verified the node and npm versions with respect to server and jenkins ...
1
vote
0
answers
9
views
Make frontend maven plugin install node_modules in the same directory as the package.json, NOT in a /node directory
How it works currently:
during the generate-resource phase of maven build the frontend maven plugin installs all the dependencies in /node directory created in the working directory specified in the ...
0
votes
1
answer
18
views
node.js v18 using babel - how to import module with extension and how to run from build folder (commonJS) while type:module is in package.json
I am using Node.JS v18.20.4 with Babel.
Here is my babel.config.json
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node&...
0
votes
0
answers
15
views
I'm getting an error installing node-speaker on Mac
I'm getting the following error log when trying to install speaker.
$ npm install speaker
npm ERR! code 1
npm ERR! path /Users/username/code/play/node_modules/speaker
npm ERR! command failed
npm ERR! ...
0
votes
0
answers
53
views
Exit handler never called! This is an error with npm itself
I am trying to run tests in the pipeline for a react application. Script looks as below:
Earlier the first three lines weren't there. I have tried running the command npm install with --force/--legacy-...
0
votes
0
answers
32
views
Having trouble running a project locally/ npm install, dependency issues
I am trying to run an example project locally. Its a full stack project so it needs to access a mongodb database. I downloaded the project files, and ran npm install so I could get everything set up, ...
0
votes
0
answers
19
views
npm install fails in Azure Pipeline
I am confused...
We have build pipelines for several projects running on self-hosted build agents on a single server. All pipelines are setup the same:
checkout from GIT
install Node
npm authenticate
...
0
votes
0
answers
16
views
Getting "TypeError: Cannot read properties of null" while trying to install NextJS
I'm following this official tutorial:
https://nextjs.org/learn/react-foundations/installation
When I run this command:
npm install react@latest react-dom@latest next@latest
I got this error:
npm ...
1
vote
1
answer
36
views
ng not found error when building Angular project using dockerfile
I came into a very strange issue yesterday. I have been working on an Angular project and deploying using docker. Everything works fine till yesterday, all of sudden I cannot build the docker image. ...
0
votes
2
answers
58
views
Why does creating a React/Vite app take so much time?
I'm trying to make a simple app with React but I'm stuck at the first step. It doesn't seem to do anything at all. Tried with both npx create-react-app and npm create vite@latest:
It's stuck on the ...
0
votes
1
answer
20
views
Install peer dependencies in lib automatically on the client side
I am developing a React package/library and have compiled it using Rollup. The package includes several components that need to be used in an Angular app.
I've specified a few packages as ...
-2
votes
0
answers
46
views
what is this "ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time"
I have created an npm package and when we run it using npx it outputs the result but also give this error before printing output:
ExperimentalWarning: Importing JSON modules is an experimental ...
2
votes
0
answers
45
views
npx hanging during initialization of react, expo, and next app
I am currently experiencing an issue where the following commands (and potentially more) hang indefinitely when trying to initialize a project:
npx create-react-app
npx create-expo-app
npx create-...
0
votes
1
answer
33
views
I am not able to create my first react app. Can anyone help me?
PS C:\Users\rkmgr\OneDrive\Desktop\react course> npx create-react-app my-app
npm error code ENOENT
npm error syscall lstat
npm error path C:\Users\rkmgr\OneDrive\Desktop\react course\%APPDATA%\npm
...
0
votes
0
answers
15
views
Webpack complied with 1 error when i try to npm run dev [closed]
I am doing a course on javaScript in udemy. It is first time i am using things like webpack and babel , in my final step of project setting when i try to do npm run dev . I get this error
C:\Users\...
1
vote
2
answers
28
views
Angular local library component rendering error (reading 'bindingStartIndex')
I've got a thing to discuss on Angular 12/13.
I'm not a huge frontend hero, and have never dealed with own angular libraries, so may be I'm asking stupid questions, so sorry, but..
Here (github) a ...
0
votes
1
answer
23
views
Can't install Cordova plugin from GitHub
I'm new to Cordova and I tried to add some packages to my project. I needed to install one specific package from GitHub, so I tried using following:
cordova plugin add https://github.com/acipher/pos
...
-1
votes
0
answers
13
views
missing script run in the terminal
PS C:\Users\U> npm run hello
npm error Missing script: "hello"
npm error
npm error To see a list of scripts, run:
npm error npm run
npm error A complete log of this run can be found in: ...
-1
votes
1
answer
34
views
Deploying a React application on GitHub Pages
I'm triyng to dpeloy my react application on Github Pages, but my 'npm run deploy' is not executing.
This project file is just a test application that is a brand new React App.
screen shot of vscode:
...
0
votes
1
answer
15
views
Unexpected permissions errors when running dev script on vite based project
Everytime I try to run project based on Vite and running dev script, this happens. I'm only able to solve this by running VsCode with as administrator. Setting the folder to R&W permissions for ...
1
vote
0
answers
25
views
primevue components not available in custom npm package [Vue warn]: Failed to resolve component
I want to create an npm package that will render a textbox and a button.
In this npm package, I want to use primevue Button component.
This is the published package link: vue-main-package
I use this ...
0
votes
1
answer
86
views
Manage Dependencies in Sub-Project To Avoid Duplicate React Versions
I am attempting to create a React library template. I have the main project that exports some basic React hooks and then an example project enclosed within it that imports the library via "@local/...
-1
votes
0
answers
46
views
Error: Cannot find module 'node:path', while using any npm command
my nodejs app was working fine, then i tried to install mongoose,
i dont know what happened, now my npm commands are not working, throwing an error as below
PS D:\NodeJS\sample> npm i
internal/...
0
votes
1
answer
14
views
Imported package is undefined eventhough it is in the node modules
I am working on react-native application. Like all JS frameworks, I have installed the packages such as formik, react-native-calendars here also. And it is visible in package.json. And also I have ...
0
votes
0
answers
10
views
NPM Run fails with unexpected server response
i need help o solve the problem:
error: FATAL Failed to initialize the connection: Unexpected server response 502.
received this error after i have executed:
npm run MYAPP --verbose transfer -- --to ...
1
vote
1
answer
23
views
NPM Version Range Grammar not regular?
When specifying required versions of a dependency in npm, we can specify ranges of versions. For example:
1.2.7 || >=1.2.9 <2.0.0
Specification:
https://github.com/npm/node-semver?tab=readme-ov-...
-1
votes
2
answers
39
views
Getting error when doing npx create-react-app my-react-app
PS C:\Users\ARPIT\Desktop> npx create-react-app my-react-app
npm error code ENOENT
npm error syscall spawn C:\WINDOWS\system32\cmd.exe
npm error path C:\Users\ARPIT\Desktop
npm error errno -4058
...
0
votes
2
answers
34
views
GitHub Actions: npm publish fails with 'Permission denied (publickey)' error for public repository
I'm trying to publish an Angular library using GitHub Actions, but I'm encountering an error related to SSH authentication. Despite my repository being public, the npm publish command fails with the ...
-1
votes
0
answers
27
views
npm install hangs up when using bundleDependencies [closed]
My package.json dependencies looks as below:
"dependencies": {
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"express": "^4.18.2&...
0
votes
0
answers
12
views
Why do I get Error: spawn /Users/{user name}/Library/Android/sdk/platform-tools/adb ENOENT when trying to run npx expo start --tunnel
The normal npx expo start doesnt work for me for some reason, so I saw that you need to write npx expo start --tunnel. The first time it went well and it started, but when I did it the second time I ...
0
votes
2
answers
43
views
Node gives me as version: v23.0.0-nightly2024071586415e4688
I am trying to update node on UBUNTU (version 22.04.4 LTS) and have followed the official procedure on their site:
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-...
-1
votes
0
answers
16
views
How to submit anything through npx command [closed]
I have made some projects in TypeScript so now I have to submit it with GitHub link and npx command, the problem is that I don't know how to how to put npx command on the form. For example I have made ...
-1
votes
0
answers
18
views
Npm vs Yarn on Expo [closed]
On Expo, I heard that PlugnPlay is not supported by Yarn. So there is no reason to use Yarn Berry and hench I don't see any benefits of using Yarn V1 over using npm. Also, I have faced multiple ...
0
votes
0
answers
15
views
Change run location of a github project using npm run dev
I am using this github project: https://suno.gcui.ai/ and it defaults to running locally on localhost:3000. I am running this in a webserver, not on my local machine, so I want it to run on the ...
0
votes
1
answer
28
views
New Vite Project not installing node modules after "npm i"
I am in the process of creating a new react project with vite and whenever I run "npm i" inside the project the node modules and package lock are not created. I have vite and node installed ...
0
votes
1
answer
49
views
why doesn't npm install work properly in NestJS/ubuntu
I was working on a NestJS project, I recently moved from windows to Ubuntu and once I cloned the project from github on my linux, the npm install command doesn't work with the following error:
...
-1
votes
1
answer
55
views
Cannot install codemod?
I tried to run codemod through npx codemod react/findDOMNode --target src, however this gave an error. The same as the error I got when I tried to install the codemod package: (npm i g codemod)
npm ...
-2
votes
0
answers
60
views
Unexpected token (254:15) while parsing..\node_modules\marked\library\marked.umd.js while parsing file
Trying to upgrade for marked version 13.0.2 and getting following error in debug console when run npm run watch:client. Unexpected token (254:15) while parsing .. node_modules\marked\lib\marked.umd.js....
-1
votes
0
answers
36
views
Npm google.maps - AdvancedMarkerElement does not have all the functions as of Legacy Marker element
I needed to use AdvancedMarkerElement in my Project so have installed Npm package google.maps
"@types/google.maps": "^3.55.11"
But when i tried replacing marker with ...
0
votes
1
answer
82
views
npm build is failing due to lodash
Using
Node: 16.20.2
Angular: CLI 11.2.5
Typescript: 4.1.5
@types/lodash: 4.14.177
npm build started failing with below exception
Error: node modules/@types/lodash/common/object.d.ts:1026:46 error ...
-2
votes
1
answer
18
views
How to avoid installing nested dependency for specific package which is vulnerable [closed]
I have a dependency for package.
@loopback/booter-lb3app : "^6.0.4
This install : booter-lb3app and this package has loopback-swagger
In booter-lb3app -> package.json
dependencies : {"...
0
votes
0
answers
8
views
Why does my npx plop function can't find my plopfile?
I'm building a npx package to generate React apps boilerplates. For this I'm using Plop.js. The CLI works when I'm in inside the package's folder, but if I run the npx command outside it returns this ...
-1
votes
0
answers
14
views
npm packages express and https installation error [closed]
PS C:\openssl\node_express_http> pip install npm i express https
Collecting npm
Using cached npm-0.1.1.tar.gz (2.5 kB)
Installing build dependencies ... done
Getting requirements to build ...
-3
votes
0
answers
30
views
I have been using React for a while but today I came across an err which i dont understand..Whenevr I use npm start or npm run start I keep getin err [closed]
PS C:\Users\pc_user\Desktop\mern> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! ...
0
votes
1
answer
31
views
How can I improve on reading large codebases? [closed]
I've been programming for a bit now I'm not that new but sometimes I cant seem to understand code that I read there isn't anything that specific but, for context I have only created web apps never ...
0
votes
1
answer
21
views
Getting npm run dev errors trying to work with Svelte
I'm trying to work through a Svelte starter project on MDN. I was able to run the first step of the project locally after using npx but when I tried to clone the Github repo I keep getting an error on ...
0
votes
0
answers
30
views
How to handle hotfixes with libraries? [closed]
so i have an application that has 5 UI's Repositories, and a ton of npm libraries and services (that we created).
We have 3 environments DEV, QA, and PROD.
We are deploying changes all of the time to ...