0

Here is a strange one for you, when I try to publish a package with npm to github on my new MacBook Pro (it is an M1, so it might be a bit of weirdness) it just it ignores all the files in the "dist" directory except for the package.json file.

It works fine on my old MacBook Pro and the code is identical. All I can think of is I have forgotten to do something, but I cannot for the life of me work out what. I have searched and searched and not found anyone who has this problem.

Here is the folder structure: enter image description here

Here is the package.json:

{
  "name": "@secretaccount/authoriser",
  "version": "1.0.37",
  "description": "",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "files": [
    "dist/"
  ],
  "publishConfig": {
    "registry": "https://npm.pkg.github.com/"
  },
[snip]

Here is the output from npm publish:

npm notice 
npm notice   @carsvansandbikes/authoriser@1.0.37
npm notice === Tarball Contents === 
npm notice 1.3kB dist/package.json
npm notice 1.3kB package.json     
npm notice 12B   README.md        
npm notice === Tarball Details === 
npm notice name:          @secretaccount/authoriser            
npm notice version:       1.0.37                                  
npm notice filename:      secretaccount-authoriser-1.0.37.tgz  
npm notice package size:  732 B                                   
npm notice unpacked size: 2.5 kB                                  
npm notice shasum:        e0c7f6fe9fe6219a4028de91786418144b642101
npm notice integrity:     sha512-E23BiP4l5MWp5[...]FRmx3e9zFr7hQ==
npm notice total files:   3                                       
npm notice 

As you can see it only packs a total of 3 file.

Any ideas?

Paul A.T. Wilson
  • 854
  • 2
  • 9
  • 18

1 Answers1

0

The problem was within NPM. This has been fixed.

Paul A.T. Wilson
  • 854
  • 2
  • 9
  • 18