Questions tagged [npm-package]
464 questions
3
votes
1 answer
Increase the NPM Package version automatically
I am creating my own NPM packages for the first time. For each commit, 1/ The package version should increase on the NPM registry, 2/ Update the package.json file in the github repository.
.github/workflows/publish.yml
on:
push:
branches:
…

Nandy
- 666
- 1
- 12
- 27
3
votes
1 answer
Nest can't resolve dependencies of the DiscoveryService (?). Please make sure that the argument ModulesContainer at index [0] is available in
In a NestJs project, I created a module that uses, DiscoveryService in the services. It working fine. I wanted to create a nest library from that module. I followed this nestJs documentation then I am getting the below error. I tried both adding…

Chathura J
- 31
- 1
3
votes
1 answer
ngx-perfect-scrollbar is deprecated
I found out that ngx-perfect-scrollbar has been deprecated. I found out the npm package health analysis says that this package is safe until now but it is not supported anymore.
link: https://snyk.io/advisor/npm-package/ngx-perfect-scrollbar
so I…

Peter Amir
- 33
- 1
- 5
3
votes
0 answers
Provide jest mocks for your own package for easy use in consuming projects
I have a private npm package that I use in multiple projects. Right now, each project has a copy of the mock for this internal library. Pretty much something like this in each jest setup file:
jest.mock('@myscope/shared-logger', () => ({
…

Justin L.
- 993
- 14
- 33
3
votes
1 answer
Importing a css npm package in css file
I made a NPM package which contains a CSS file which I have to include in my main CSS file.
In a normal html CSS website I have to write @import url("./node_modules/web-creative-fonts/index.css") but what I want to do is that we just have to write…

Bhuvnesh Sharma
- 45
- 5
3
votes
1 answer
How to force npm not to create symbolic link to local package?
I downloaded local copy of npm package and extracted it on desktop.
Then I used npm install /directory/ to install it.
What I noticed is that when I remove desktop directory, app says it can't find installed module. After further investigation I…

ablaszkiewicz1
- 855
- 1
- 10
- 26
3
votes
0 answers
Problem with React useEffect in own npm package
We have made our own npm-package and I'm now working on a time out alert.
To get the time out to work right I need to have it inside a useEffect but I get error: react.development.js:1465 Uncaught Error: Invalid hook call. .
The file in the…

Joe
- 88
- 1
- 8
3
votes
1 answer
Creating an NPM package out of a Create React App and publish on Gitlab
This might be a stupid question but I really don't know what is going on.
I have created a React App with crate react app and uploaded it as a private repository to my GitLab account. The (default) React App starts as expected after running yarn…

Flo Ragossnig
- 1,341
- 14
- 38
3
votes
0 answers
Can you setup npm package on git for installation without exposing code?
I have some private packages in my git repository. I recently learned that you can install npm packages directly from git. I want to setup my git repo so that packages can be installed from git directly by the user of my project. This will be done…

sarosh
- 107
- 10
3
votes
1 answer
How to add an npm package inside stencil js project?
I am creating a stencil project which uses an npm package inside it, is there any options to add an npm package inside stencil project. Any suggestions I searching for a solution for quite a while.
This is how i use ck-editor in angular

Vishnu Shenoy
- 862
- 5
- 18
3
votes
0 answers
Global "npm ERR! peer dep missing" can this be fixed?
Looking for a clear direct answer.
I have installed a global [Package A ]
Let's say aws-amplify, e.g. @aws-amplify.
[ Package A ] has [ Package B ] that wants [ Package C ].
e.g. aws-amplify has inquirer-autocomplete-prompt that wants…

Zach
- 539
- 1
- 4
- 22
2
votes
1 answer
Cannot find module 'bcryptjs'
I installed @types/bcryptjs package in nodejs. When I import it only, there is no problem but when I use it in my code, like that:
console.log(bcrypt.hashSync(req.body.password))
it gives me an error; Cannot find module 'bcryptjs'
What do I do?
I…

Aref
- 23
- 3
2
votes
0 answers
NPM package - reference source file
I was wondering if it was possible to reference the source file of a Node JS NPM package. (As in the code inside of /node-modules/package-name)
I've thought about going up a directory until the node-modules folder is found, but I'm not sure if that…

question asker 420
- 21
- 1
2
votes
1 answer
"npm ERR! invalid semver" while trying to publish npm package
npm ERR! code EBADSEMVER npm ERR! invalid semver: npm ERR! A complete log of this run can be found in:
I've already tried re-install node and semver. It doesn't works

AndreySFN
- 21
- 2
2
votes
0 answers
npm Bootsrap starting project for newbie
I learned about Sass and Bootstrap, and now want to put it all together in a project using npm, but I’m completely lost.
Here’s what I’ve done so far:
$ npm init
// following the intructions//
$ npm install typescript
$ npm install…

Louis.vgn
- 149
- 1
- 1
- 9