mapbox / npm-internal

helps you package internal npm modules and upload them to your own s3 bucket.
MIT License
11 stars 3 forks source link

npm-internal publish does not work for scoped packages #29

Closed mapsam closed 7 years ago

mapsam commented 7 years ago

running npm-internal publish for a scoped module currently fails:

Error: ENOENT: no such file or directory, lstat '@org/package-name-1.0.0.tgz'

It appears npm pack creates a package tgz with the following name: org-package-name-1.0.0.tgz instead of creating a new folder called @org/. When s3.putObject comes along it looks for a packaged module within the @org/ folder but it doesn't exist.

It seems like the quickest fix would be to update the expected path for s3 to put, rather than requiring npm to create the actual @org folder.

cc @rclark

mapsam commented 7 years ago

Looks like npm makes the definite decision to rename the package name here: https://github.com/npm/npm/blob/b2ff164968ccd2c8b8310520e12457b1e2d4fbd2/lib/pack.js#L53-L55

rclark commented 7 years ago

When s3.putObject comes along it looks for a packaged module within the @org/ folder but it doesn't exist.

This definitely sounds like the place that we'll be able to fix. :+1: