467 questions
1
vote
1
answer
82
views
How do I force a specific version of a peer dependency of my library?
I am building an npm library (angular library) that needs the following packages in order to run:
@angular/core@17
@formio/[email protected]
@ngx-bootstrap@12
I have declared the above as peer dependencies of ...
0
votes
0
answers
43
views
How to make an Oclif command the default command when using explicit command strategy?
I'm building a CLI using Oclif v4 with TypeScript and tsup for bundling. I want my main command to run by default, without requiring the user to type it as a subcommand.
Currently, my oclif ...
0
votes
0
answers
54
views
Building lib in npm worspaces with typescript project references
Context
I’m working on a npm workspace with this structure:
packages/
lib-a (publishable React Native package)
lib-b (internal library not publishable)
lib-a depends on lib-b
I use TypeScript ...
0
votes
1
answer
352
views
How to package a standalone Tailwind v4 component (with tsup) without conflicting with host app styles?
I’m creating a reusable component library with tsup to share common UI elements across my Next.js projects (for example, a Footer).
The Footer works fine in my base app. But when I publish it as an ...
0
votes
1
answer
146
views
How to generate NPM package for protoc compiled Typescript
I have a desire to create a reusable NPM package for consumption in Angular 18+ (using old build system) based upon a set of .proto files. The desired usage would be a simple installation of the npm ...
0
votes
1
answer
40
views
Convert "browser" fields in package.json to esm "exports"
I have a package that uses fields like this to hide the inclusion of node.js fs fields from the browser
{
"name": "mypackage",
"version": "1.0.0",
"...
0
votes
0
answers
32
views
Managing dependency conflicts with npm aliases for design system alpha releases
Background
Our frontend team practices Trunk Based Development and Continuous Deployment, but we're the only team in our company doing so. Because of this approach, we make extensive use of feature ...
0
votes
1
answer
186
views
Uncaught TypeError: Failed to resolve module specifier "codemirror". Relative references must start with either "/", "./", or "../"
I'm trying to integrate CodeMirror 6 (including the merge addon and lang-markdown) into my NiceGUI application, following the node module integration example in the NICEGUI documentation. However, ...
0
votes
2
answers
138
views
Azure DevOps Artifacts Feed, how to embed relative image in ReadMe?
VS Code has no problem showing the embedded image in the ReadMe preview. But for some reason, the image doesn't work in Azure DevOps Artifacts once the Angular library is published as a private NPM ...
0
votes
0
answers
98
views
Issue with Installing Private GitHub Package: "405 Method Not Allowed" & "Incorrect Packument"
We have an internal package for our UI library, which is stored in the GitHub package registry and installed using the npm command. Now, as of this morning, when we bumped a patch version and ...
0
votes
0
answers
27
views
Prevent Overriding a nested dependency while using npm
I have the following dependency tree:
├─┬ @angular/[email protected] overridden
│ ├─┬ @schematics/[email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected] deduped
│ ├─┬ npm-...
0
votes
1
answer
653
views
Publishing an npm package with restricted access
I wrote a yeoman generator and want to publish it as an npm package. I do not want it to be public though and I only want certain people or my team/organization to have access.
Although I would like ...
0
votes
1
answer
24
views
Tailwind classes used by my vue component within my npm pacakge not available when package is imported
I have the below Vue Component:
// src/components/CodeBlock.vue
<script setup>
import { ref } from 'vue';
const props = defineProps({
value: String
})
const text = ref(...
0
votes
0
answers
78
views
NPM publish fails in .gitlab-ci.yml
I have created a pipeline, which runs smoothly in almost all projects, where I am using it. Except one. All projects have to excat same permissions. I use node:16.20 for all as image, I have tried ...
0
votes
0
answers
51
views
APNS Error when Sending Live Activity Notification in Node.js
I'm working on a Node.js application that sends live activity notifications using the apns2 library. However, I'm encountering an error when trying to send a notification. Below is the relevant code ...
1
vote
1
answer
367
views
Module not found: Package path ./webgpu is not exported from package I am getting this error when i try to import imgly background removal
Every time I import the imply background removal I get this error like
Module not found: Package path ./webgpu is not exported from package C:\Users\dhruv\node_modules\onnxruntime-web (see exports ...
3
votes
1
answer
337
views
How to bundle "types" field in package.json when using "export" rather than "main"
When using the "main" field of package.json for a Typescript NPM package, this documentation explains how to ship your types (as .d.ts files) alongside the payload exported JS file.
package....
1
vote
0
answers
108
views
Error 'RCTAppDelegate.h' file not found with command pod spec lint
I have a React native app with native code (is not library project).
I add a .podspec file because I want to publish a npm package.
When I run command pod spec lint i have this error
ERROR | [iOS] ...
1
vote
1
answer
321
views
How to Install All Dependency Types (Prod, Dev, Optional, Peer) of an NPM Module?
My goal is to download the entire dependency tree of a npm project, including production, development, optional, and peer dependencies, so I can upload them to my offline Sonatype-Nexus-Repository.
...
0
votes
0
answers
332
views
How to resolve "An export assignment cannot be used in a module with other exported elements." in dompurify 3.0.5 in purify.cjs.d.ts
I have an angular project uses "node": "14.17.3". Not sure what changed but all of a sudden I have an issue with dompurify 3.0.5.
Error: export 'sanitize' (imported as 'DOMPurify') ...
-1
votes
1
answer
125
views
Import intellisense for custom package is not working in vs code
Hi i am creating 2 simple test projects where project A is a custom NPM package and project B consume it. The issue is that there is no import intellisense.
My folder structure looks like this:
...
3
votes
2
answers
2k
views
How can I specify architecture specific npm packages in package-lock.json?
I am developing on Windows and have a CI pipeline in a linux container on GitLab. I can build my Angular application on both systems successfully as long as I do not commit the package-lock.json file.
...
0
votes
0
answers
86
views
How to solve npm install(npm err 1)?
Who can help me for npm package install error?
Steps: I've tried:
Uninstalled and reinstalled Node.js, but the issue persists.
Deleted the node_modules folder and re-ran npm install, but encountered ...
2
votes
0
answers
1k
views
Conflicting peer dependency (react/NextJS 15.0)
While working on a web app with NextJS 15.0, I am hitting some issues. Here is a log I get after running firebase deploy:
2024-10-23T02_18_48_690Z-eresolve-report.txt
'Log files:
/Users/me/.npm/_logs/...
13
votes
4
answers
16k
views
NextJS/React Type does not satisfy constraint
I have code in a NextJS app showing some problems, though it has been working up to now.
I suspect it is because some npm package version has changed, but I'd like to get an external eye looking at ...
0
votes
1
answer
968
views
npm not working while node js is working fine , dont know what is the problem
I have tried everything to run npm, installed and uninstalled node js various times still npm is not running while node js version is showing by using node -v , that is v20.18.0, but npm -v , gives ...
1
vote
0
answers
145
views
npm override overrides not only the package I specify
I have dependencies structure
├─┬ @nestjs/[email protected]
│ └── [email protected]
├─┬ @nestjs/[email protected]
│ └─┬ [email protected]
│ └── [email protected]
└─┬ @nestjs/[email protected]
...
-2
votes
1
answer
148
views
How use an npm package in astro component
In my package.json I have the following package:
"dependencies": {
"@company/my-package": "0.1.2024.0.1",
}
I created an astro component MyPackage.astro.
Do i ...
0
votes
0
answers
176
views
Getting issues while updating googleapis from version 100.0.0 to 144.0.0
I am updating my googleapis package in my mern project
so here I am using googleapis to create and export data in google sheets
while updating I am facing some issues related to type of the ...
0
votes
1
answer
278
views
How to integrate icons into an angular library?
I would like to integrate an SVG icons into my angular library's template, and I have the following questions?
Where should the /assets folder be located? Should it reside under /src or /src/lib ...
3
votes
1
answer
352
views
Creating a Typescript Library Using Vite, leads to import errror: "TypeError: au.release is not a function" in the project
Questions:.
Where does the error come from?
And why it appears if additional imports happen in the library?
How can I export my custom library in other project without breaking the project - ...
1
vote
0
answers
21
views
How to resolve an Unknown request from webview: {"type":"arFlameGraphRequested","command":"arFlameGraph.open"}
I am encountering an issue with my VS Code extension where a command sent from a webview is not being recognized by the extension. The command arFlameGraph.open is registered in the extension, but ...
0
votes
1
answer
333
views
How to load static files inside react component while creating react library using webpack
I am trying to create custom react library and wanted to load some files [js,data,wasm] from assets folder inside my react component but I am not able to load those files I tried multiple loaders.
if ...
1
vote
0
answers
141
views
NX affect works for build but not for release
I'm having a nx monorepo for a design system and would like to publish packages to NPM only when they have changed.
Unfortunately this doesn't work for me as you can see here:
npx nx affected:build --...
1
vote
1
answer
471
views
Can't publish a package to npm and GitHub package via GitHub actions
The GitHub actions fails with this output:
npm error need auth This command requires you to be logged in to https://registry.npmjs.org/
npm error need auth You need to authorize this machine using npm ...
0
votes
0
answers
192
views
Why do I have multiple React imports in my Rollup bundle and how can I resolve it?
I'm using Rollup to bundle my custom npm react library, but I'm encountering multiple import statements for React and ReactDOM in the bundled output, and getting errors like cannot import (useContext |...
1
vote
0
answers
40
views
Directus extension: Cannot find package 'ssh2'
I have created the directus extension and now calling ssh2 package in it.
Getting this error when I am running backend server:
Cannot find package 'ssh2' imported from /directus/extensions/...
0
votes
1
answer
33
views
Using a local unpublished NPM package in the react native app
I have the following package mylibrary having a class and an interface exported.
src/Notification.ts
import {INotification} from 'INotification';
export class Notification implements INotification {
...
0
votes
1
answer
72
views
VS Code doesn't suggest hints for typed attributes from my library
I'm creating a React application using my component library and noticed that VS Code doesn't suggest hints for attributes that are typed with my custom types. Here's a simplified version of my code:
...
1
vote
1
answer
114
views
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) in custom npm package
I'm working on a custom npm package (private) with a theme so I can use it across all my projects.
I'm using react-datepicker in my package to create a custom DatePicker component
I have no trouble ...
0
votes
1
answer
71
views
Rollup and babel does not transpile cssprop to styled component
I'm developing a React component library for npm. The tech stack includes:
React
TypeScript
styled-components
I'm using Babel and Rollup for the build process.
My issue is that I want to use the css ...
4
votes
2
answers
9k
views
Vite + TS + vite-plugin-dts - incorrect generation of type files
I'm writing a library of react components using Vite and TypeScript.
To create type definition files I'm trying to use the recommended plugin vite-plugin-dts.
This is what my vite.config.ts file looks ...
0
votes
0
answers
160
views
How to develop locally for NPM but include the package in package.json
There are numerous posts on how to work on a npm module locally but when I do package.json settings no longer have a reference to the remote module?
The guide goes like this:
in your npm package ...
0
votes
1
answer
132
views
Sharing Dev Dependencies for Multiple Company Repos via a Private Dependency
We use an entire TypeScript-driven stack at my company (back-end, front-end web, mobile). While creating our ecosystem, we have created a number of private Node packages in order to share as much code ...
0
votes
0
answers
33
views
NextJS 14 App Page Freezing UI using own custom developed NPM Packages in ReactJS using ViteJS
I have nextjs 14 app using mui, I have created my own npm packages for it's components in reactjs using vitejs, that is running perfectly fine.
Problem:
The issue I'm facing is that when i open ...
1
vote
0
answers
37
views
Nexus version upgrade casuing the whole scope go corrupt - missing metadata of the scope/package
If I deploy a version 1.0.0 it gets deployed and works fine. The below link gives all the metadata which is used to download the package.
http://nexus/repository/my-nexus-repository/@my-scope%...
3
votes
1
answer
2k
views
Difference between aws-cdk and aws-cdk-lib packages
In the package.json of my application I see two different packages named aws-cdk and aws-cdk-lib. What is the difference between both of them?
0
votes
1
answer
57
views
Unable to publish dependencies to my private repository
I am unfamliar with npm packages and node. I have a package.json file with a package with many dependencies. A node_modules dir in the same dir contains all the modules. When attempting to publish to ...
0
votes
2
answers
213
views
TS2339: Property 'scope' does not exist on type 'JwtPayload'
I'm encountering an error in IntelliJ when trying to use decodedJwt.scope.
The error message is: Property 'scope' does not exist on type 'JwtPayload'.
The only suggestions IntelliJ provides are: sub, ...
0
votes
2
answers
261
views
Why is TypeScript not finding my own package?
I created a fork of another package and published it under a unique, new name:
https://www.npmjs.com/package/feed-media-fork
I tagged a new version, created a release on github and yarn add feed-media-...