3

I am trying to test one of the package locally. What I do is go the root directory of my package and run

npm pack

It creates .tgz file and I install this file via npm i <path to file>. Now I found that some of my recent changes are missing in this .tgz file. I have made some tiny modifications in css file and those are not reflected in packaged .tgz file. I am not sure what is wrong here. I have looked into internet but all questions in SA and other resources says to use 'npm pack' to create tgz file, but not about this issue.

npm version 6.14.13

Gaurav Chauhan
  • 1,295
  • 4
  • 17
  • 41

2 Answers2

3

Did you do npm run build to build the latest code change? I encountered the same issue today and this was the step I forgot.

To troubleshoot, you can unzip the tgz and inspect the source files there directly to see if they are the latest version.

You can also look into the dist folder in your local repository. After running npm run build, the source code in dist folder should reflect the latest code.

Dongminator
  • 795
  • 10
  • 15
0

Try deleting the old tgz file then again run npm run pack. It will work.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 29 '23 at 17:33