Questions tagged [npm-pack]

"npm pack" is a command on npm CLI, which creates a tarball from a package.

Reference:

27 questions
1
vote
0 answers

NPM Excluding files automatically >

I am trying to publish a package on npm. It's poppler's pdftotext portable. The lib folder structure is like…
Venktaish
  • 121
  • 7
1
vote
1 answer

Shared UI component

I'm working on a project where I'm creating a Shareable UI component for my team. This project is built using Angular CLI and is using the USWDS framework. So far I have been successful in creating a custom npm package on a private npm repository…
Herr Josua
  • 453
  • 7
  • 19
1
vote
1 answer

Replicating `npm pack` behavior

I am trying to replicate the behavior of npm pack because it has a limitation where it does not write to stdout, it can only write to a local file (see this issue: https://github.com/npm/npm/issues/12039) Now, I can tar the current directory and…
user7898461
0
votes
0 answers

re-install an npm module of a file path doesn't work in react

Hi I'm facing some problem when re-installing my own created npm package. this is the script that I use: cd ../../my-npm-package npm install npm run build-package ("build-package": "rm -rf lib && tsc --outDir ./lib --declaration --noEmit false &&…
0
votes
1 answer

npm pack removing file extensions from import

I'm trying to a create an internal library for work. All seems to be fine until I attempt to use in another project. The file extension in all of the import statements seems to have been removed during the npm pack phase. In other words, the…
Dave Maison
  • 383
  • 1
  • 13
0
votes
0 answers

npm ERR! code ENOENT. Does not create a new package.json or install dependencies

I wanted to start a new package.json with npm init -y from the windows cmd and the console throws an error. I tried to solve it this way and it didn't work. Remove the npm cache with npm cache clean --force. Update to the latest version of…
Chuans
  • 1
  • 1
0
votes
1 answer

Create react functional component with hook and publish him in npm package

I try to create own npm pack. I created and published my component, it is working, but when I add UseEffect in my component I have errors. What is goin on? import React, { FC, useEffect, useState } from 'react'; import './Button.scss'; export…
Chips
  • 69
  • 5
0
votes
0 answers

Unexpected token: File was processed with these loaders: ./node_modules/source-map-loader/dist/cjs.js

I've created a simple project using create-react-app . Then I added another react project named dashboard (using npm pack and install in target project). Everything was ok until I imoported one component of dashboard project(AdminLayout from…
bami
  • 211
  • 1
  • 6
  • 19
0
votes
0 answers

Is the format of NPM pack specified?

When I run npm pack it produces a .tgz with all the contents inside of ./package/. Is the behavior of npm pack specified anywhere?
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
0
votes
1 answer

npm pack doesn't include all files in the package

I run npm pack inside dist folder, but it doesn't include all it's files. it just contains: package.json, ReADME.md, index.js (main). there is no .gitignore file, and I tried to create an empty .npmignore file, but it didn't help. I also tried to…
Sh eldeeb
  • 1,589
  • 3
  • 18
  • 41
0
votes
0 answers

Typescript definition file (auto-generated) with a class that extends another class

I am having an issue with the auto generated d.ts file for a file that extends another class. We have a class structure like so: (TS Version 3.2.4) export declare class MyBaseClass { id: string = '123'; name: string = 'hello' } we then…
mbx-mbx
  • 1,765
  • 11
  • 23
-1
votes
1 answer

Install issue with VUE.js JavaScript

When I am trying to install NPM package in my machine. Getting this error. This is the debug.log file click here
jual ahmed
  • 439
  • 5
  • 14
1
2