Questions tagged [npm-package]

464 questions
0
votes
1 answer

Adding types to JS npm package

I have built a JS package and now i want to add compatibility for typescript. I could not really get it to work by reading the TS docs on how to publish a npm package. using import { ClientConfigurationOptions } from "my-package"; is not…
iKingNinja
  • 113
  • 9
0
votes
0 answers

How to publish expo-based npm package using typescript?

I created a npm package for expo users to build the navigation named expo-custom-navigation using the popular package called @react-navigation I am unable to create lib folder and also want the guide to publish package properly using…
0
votes
0 answers

npm run Error: Failed to find .env file at path

Can anyone help me on this I searched solution to other questions but not getting solution. my node version is v16.10.0 and npm version is 7.6.3. I am getting below error when i run command npm run dev --country=ASIA --env=uat > learn-starter@0.1.0…
ankit
  • 2,591
  • 2
  • 29
  • 54
0
votes
0 answers

How to include polyfills in self-published npm package so that it does not cause errors when used with Webpack v5.x?

Hi this is my first npm package (it is a React component library) that Ive published and I realized that while it works perfectly fine when used with Webpack v4.x, the issue is that anyone who uses Webpack v5.x or uses npx create-react-app command…
Lindy T
  • 1
  • 1
0
votes
0 answers

How to distribute Bootstrap theme

What are best practices to distribute bootstrap theme for React Apps? zip folders in 2022? npm package? import 'bootstrap/dist/css/bootstrap.css'; // Put any other imports below so that CSS from your // components takes precedence over default…
J. Doe
  • 73
  • 1
  • 8
0
votes
0 answers

How to delete a row from DOCX JS based on if a value is not present for the corresponding row

I am using npm docx package to dynamically generate table based on the value of a heading in my data structure which is like data : { heading: value }, what I want is that if the value is not present or undefined the table row should be empty,…
Kushal Jaiswal
  • 103
  • 1
  • 5
0
votes
0 answers

Export `css` from Styled components macro are not found

I have a components library made with styled components and published on npm. To have better class names, I'm using babel-plugin-styled-components, which works well if I'm working locally. If I install the npm package on another project, I get this…
JulSeb42
  • 157
  • 1
  • 9
0
votes
1 answer

react project ,im getting this error,i have try to delete the node module and package.json but i got permission not granted to delete,also npm install

node:internal/modules/cjs/loader:956 const err = new Error(message); ^ Error: Cannot find module './functions/valid' Require…
0
votes
1 answer

How to avoid the npm error while installing new package to Angular application?

I need to have an npm package to be installed for my Angular Application to update the date-time range picker. So I have decided to implement ng2-daterangepicker in my application. But I got an error while installing its package itself. It is…
vijay s
  • 147
  • 1
  • 4
  • 15
0
votes
0 answers

Module parse failed in npm module

I just started learning React and NextJS and I ran into this problem when trying to install a npm package. "Module parse failed: Unexpected token (52:6) You may need an appropriate loader to handle this file type, currently no loaders are configured…
Hong Wei
  • 1
  • 1
0
votes
0 answers

Is there a npm registry query to get the package with to get minor or patch version package details

can anyone help me with query to get a package with minor or patch versions from npm registry. https://registry.npmjs.org/eslint-scope/7.1.1 - this would give package details for 7.1.1 version. I would like to understand how can we pass ^7.1.1 or…
0
votes
1 answer

NPM dependency from Gitlab directly

I have a situation where there was an update in one of npm packages I use in my project, but author didn't publish it on npmjs registry, so up to date code sits in gitlab only. What would be the best solution to get updated version of code? I…
Andyally
  • 863
  • 1
  • 9
  • 22
0
votes
0 answers

Is it possible to make an NPM package that allows users to determine what dependency they need?

I'm going to make my first NPM package and I have two versions of it. One that needs MUI4 as a dependency and another that needs MUI5. I would like to just have one package that can support them both, but obviously don't want to (and couldn't even…
bonum_cete
  • 4,730
  • 6
  • 32
  • 56
0
votes
0 answers

DaisyUI loading twice in terminal

I am using Svelkit and DaisyUI When I do a 'npm run dev' in VS CODE the response in the terminal shows DaisyUI "twice". ➜ Network: use --host to expose � daisyUI components 2.24.0 https://github.com/saadeghi/daisyui ✔︎ Including: base,…
0
votes
1 answer

How can I exclude certain css classes from third party lbrary?

I need to use library https://www.npmjs.com/package/vue-lazytube which has some css applied on h2 and button html elements. What is the way to prevent all these being applied because those styles are breaking existing styles on the website. example:…
Sonny49
  • 425
  • 3
  • 18