Questions tagged [npm-package]

464 questions
1
vote
2 answers

index.js doesn't see node module on import

My project didn't have package.json earlier, but now I have to add npm packages to the site. I typed in project root directory npm init, after npm i moment and package has been installed, but index.js file doesn't see it, so this code import moment…
Lvasche
  • 91
  • 1
  • 9
1
vote
0 answers

"react-horizontal-scrolling-menu" is giving issue when running jest test after version update

I am working on a react project created by create-react-app with all default settings. I am using "react-horizontal-scrolling-menu" package in my code and previously I was using version "3.2.5" and when I was running jest test, it was working…
Pradhumn Sharma
  • 1,663
  • 2
  • 10
  • 19
1
vote
1 answer

Multiple components default export problem in react components library

multiple component default export problem in react component library NPM package I created a react component library(with one component) and published it to NPM and its working fine. But the problem is when I tried to add another component, I'm…
Alek2499
  • 11
  • 1
1
vote
0 answers

Not able to publish React native module

Trying to publish native modules into npm. Getting Could not find a bob. yaml.
1
vote
0 answers

pnpm not found private organization package

I've published a private package on the organization level. package publish successfully. now I'm trying to install that private package into my other repository. when I'm trying installing that package using npm it's installing successfully. but my…
Archin Modi
  • 492
  • 1
  • 8
  • 19
1
vote
0 answers

Vulnerabilities when setting up Firebase and React

I am trying to build an app using Firebase and React. I have already done that in the past, but this time I hit some new issues. Here are the commands I first run in the terminal: % npx create-react-app vvhh % cd vvhh % npm install firebase At this…
Michel
  • 10,303
  • 17
  • 82
  • 179
1
vote
0 answers

Can't publish to NPM

I've been trying to publish this but I keep getting this error: I first logged in with: npm login Once logged in I just run: npm publish This is my repo: https://github.com/hypetf/pcm-converter npm publish npm notice npm notice package:…
hypetf
  • 36
  • 3
1
vote
0 answers

How can I control the npm depdencies that are loaded/buiid according to the environment, for a cross platform web/server npm package?

I made a local npm package to handle write and read of a firestore database for both Angular and Firebase Functions (simple serverless functions from Google) As dependency it has both firebase-admin and @angular/fire. //package.json of my local…
1
vote
0 answers

What is different between major, minor and beta npm release?

I was going through one of the npm dependency and i observed there are multiple major, minor and beta version releases for that dependency. It raises some questions for me which are mentioned below. Could you please help me understand those…
Rohit
  • 406
  • 1
  • 5
  • 21
1
vote
2 answers

React Component (as node package) hook issues

I'm developing a react component that is intended to become an npm package so that it can be imported into various other react projects. There seems to be a problem with using the "useRef" hook. This is my package.json: { "name":…
1
vote
0 answers

How to publish CDK project to npm and deploy after install

I would like to publish a CDK typescript project to npm repository. The project contains an app and a stack. The what I would like to do is be able to install it by running npm install my-package and then just run npm run mycustomscriptname to…
CC.
  • 2,736
  • 11
  • 53
  • 70
1
vote
0 answers

Can npm library use standalone components?

I'm using standalone components in my Angular 15 app, and I'm realizing that 4-5 of them are going to be useful across projects, so I considered moving them into an npm library. Everything I know about libraries though is that they're done via…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
1
vote
0 answers

Getting an error while installing webdriverio to the visual studio on MAC

Installing wdio packages: @wdio/local-runner@latest @wdio/cucumber-framework@latest wdio-cucumberjs-json-reporter wdio-chromedriver-service chromedriver npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!…
shreedivya
  • 11
  • 1
1
vote
0 answers

ReactJS - when creating one react application as package and installing in another react application, handlers not workings

I am trying to add one react project inside another react project. I have created a react application Project-A which I have build and packed using webpack and npm pack command and then I am installing this package from the path in another Project-B…
neha singh
  • 131
  • 1
  • 1
  • 7
1
vote
1 answer

Module Not Found - I have created a Basic React NPM package but getting an Error "Module Not Found"

I have created a basic react npm package using the command npx create-react-app following the geeksforgeeks-create-react-npm-package documentation but after publishing it, getting an error npm repo link: k-k-react-header-package import…
kashif750
  • 31
  • 6