npm publish missing index.js #5082
Comments
I'm not sure what's going on there. Using npm version 1.4.7, I'm seeing it include the index.js when it creates a tarball from that git repo.
Can you provide any other details? If you do |
Hi this is something inconsistent that happened twice (on 2 version releases). $ npm cache add gulp-angular-htmlify@0.0.6
npm http GET https://registry.npmjs.org/gulp-angular-htmlify/0.0.6
npm http 200 https://registry.npmjs.org/gulp-angular-htmlify/0.0.6
npm http GET https://registry.npmjs.org/gulp-angular-htmlify/-/gulp-angular-htmlify-0.0.6.tgz
npm http 200 https://registry.npmjs.org/gulp-angular-htmlify/-/gulp-angular-htmlify-0.0.6.tgz
$ npm cache ls gulp-angular-htmlify
~\AppData\Roaming\npm-cache\gulp-angular-htmlify
~\AppData\Roaming\npm-cache\gulp-angular-htmlify\0.0.6\
~\AppData\Roaming\npm-cache\gulp-angular-htmlify\0.0.6\.cache.json
~\AppData\Roaming\npm-cache\gulp-angular-htmlify\0.0.6\package\
~\AppData\Roaming\npm-cache\gulp-angular-htmlify\0.0.6\package.tgz
~\AppData\Roaming\npm-cache\gulp-angular-htmlify\0.0.6\package\package.json
~\AppData\Roaming\npm-cache\gulp-angular-htmlify\0.0.6\package\readme.md So you see it's missing If I run your command I see: npm pack && tar ztvf gulp-angular-htmlify-0.0.8.tgz
gulp-angular-htmlify-0.0.8.tgz
tar: Record size = 18 blocks
-rw-rw-rw- 0/0 883 2014-04-17 11:00 package/package.json
-rw-rw-rw- 0/0 2094 2014-04-17 11:00 package/index.js
-rw-rw-rw- 0/0 2964 2014-04-17 11:00 package/readme.md |
Hi @isaacs this happened to me again on a different project I'm working on, perhaps this is machine related (Ubuntu 13.04 + 14) I ran the following commands: [master][~/repos/gulp-sitemap]$ npm publish
npm http PUT https://registry.npmjs.org/gulp-sitemap
npm http 201 https://registry.npmjs.org/gulp-sitemap
+ gulp-sitemap@0.2.0
[master][~/repos/gulp-sitemap]$ npm cache add gulp-sitemap@0.2.0
npm http GET https://registry.npmjs.org/gulp-sitemap
npm http 200 https://registry.npmjs.org/gulp-sitemap
npm http GET https://registry.npmjs.org/gulp-sitemap/-/gulp-sitemap-0.2.0.tgz
npm http 200 https://registry.npmjs.org/gulp-sitemap/-/gulp-sitemap-0.2.0.tgz
[master][~/repos/gulp-sitemap]$ npm cache ls gulp-sitemap
~/.npm/gulp-sitemap
~/.npm/gulp-sitemap/.cache.json
~/.npm/gulp-sitemap/0.2.0/
~/.npm/gulp-sitemap/0.2.0/package/
~/.npm/gulp-sitemap/0.2.0/package.tgz
~/.npm/gulp-sitemap/0.2.0/package/.npmignore
~/.npm/gulp-sitemap/0.2.0/package/license.md
~/.npm/gulp-sitemap/0.2.0/package/package.json
~/.npm/gulp-sitemap/0.2.0/package/readme.md As you can see, for some reason it packed Any clue on this? |
Seeing something similar with with my module - |
In my case the problem was this line in files: ['index.js'] Duh. To get it working I changed it to: main: 'index.js' |
Same issue here happening on various projects. (i.e: grunt-sassdoc, gulp-sassdoc) The problem is this issue is not consistent, sometimes it's fine, publishing the package with the right files, but sometimes it randomly exclude some. Often the I also switched from node |
* Removed `files` field from package.json * Added `npmignore`
Is this issue still occurring with |
Hard to tell at that point, since it's happening kind of randomly. |
OK. I'm going to close this for now, because I believe it's been addressed by one of the many fixes that we've made around race conditions. If it happens again, open a new ticket. Even better would be if you can include a link to a gist with the output of |
I'm getting this issue every other |
@substack thanks for finding this issue. I'm going to reopen and ask that if anyone on this thread can put together a repro case for this issue, they should give me a shout. This bites James hard because he publishes so many packages, but it's a serious issue to ever be happening at all, and I want to fix it! |
@substack does |
I haven't encountered this bug for a very long time (perhaps since reported). On another note - I don't use |
Thanks, @pgilad. @substack, when was the last time you saw this issue? I'm hesitant to close it, because I still don't know what could have been / was causing it, but it's lower priority if it's not currently affecting anyone. |
Well, I encountered it like a week ago. Still using |
@pascalduez with which version of npm? |
I guess it was |
npm/npm#5082 again 😭
using npm pack and having this issue my index.js file is not included in the package |
@jbeckton what does |
@othiym23 3.9.5 |
updated to the current version and the problem went away. |
Good to close then? On Wed, Sep 21, 2016 at 6:14 PM, Jesse Beckton notifications@github.com
|
yes.. Thanks |
@othiym23 how's the progress on opening the tracking issues? |
Update npm. |
@SamVerschueren sorry for that I delete the comments and re-describe my problem. I have to here's my
{
...
"scripts": {
"compile": "babel-cli src --out-dir lib",
"prepublish": "npm run compile"
},
"files": [
"lib/"
],
...
}
|
I am still having a problem with randomly missing files in the tarball created by
This the one which currently ships with Node.js. I haven't ever used a version other than the one that comes with Node.js. At some point in the last few months, an update to Node.js has shipped with a newer There's a second perhaps unrelated issue too, which is
Generally though, in the specific case I am concerned about, the problem is that the tarball either contains the complete 206 files, or just 205. It appears to be about as random as a coin toss. So I tested by doing
It's always the same file that's missing. When it fails, one particular subdirectory in the tarball looks like this:
It should look like this:
So it's always the same file that's missing. Unfortunately, this breaks our automated mechanisms for deployment and turns it into a manual process. Automated deployment was just crashing servers, and while doing Apologies if this is not the right place for this, but it seems like it might be the same issue. |
@steve-p-com I can't speak for NPM but that sounds to me like just enough detail to make a compelling case that your issue is relevant to this, but not enough for them to actually help you.
I'm a little anxious to have this fixed once and for all, it hasn't been an issue for me since the |
@CYBAI that sounds like definitely not relevant to this issue, you should open a separate issue. (I'm not sure it's a bug at all, what about the |
@laughinghan I have been on vacation since I posted that message 27 days ago so I haven't taken any further steps. I am likely to be quite busy in the short term so may not get back to looking at it immediately. This was on a local dev machine which is Windows 7 64 bit. It's the only place I publish from, but in the medium term future we will be using a (linux) build server, at which point I'm really hoping the problem will go away. |
My Mistake (and it's an easy one to make)Was having this issue and this post cleared it up for me. My build directory was in my |
We're closing this issue as it has gone thirty days without activity. In our experience if an issue has gone thirty days without any activity then it's unlikely to be addressed. In the case of bug reports, often the underlying issue will be addressed but finding related issues is quite difficult and often incomplete. If this was a bug report and it is still relevant then we encourage you to open it again as a new issue. If this was a feature request then you should feel free to open it again, or even better open a PR. For more information about our new issue aging policies and why we've instituted them please see our blog post. |
Happened to me twice already, while publishing a package I wrote (https://github.com/pgilad/gulp-angular-htmlify if it matters), the package was published without
index.js
.I had no notice or info that anything went wrong during
npm publish
phase. But then got notified by a user that the package wasn't installing withindex.js
.The only thing that I can think of that caused this, other than a bug, is that I had the project open in Vim, that may have caused a failure to publish the file.
Did anyone run into a similar case? Is there anyway to verify the package contents other than installing it as a dependency and seeing what's installed?
This happened with:
git version 1.8.3.2
npm version 1.4.6
node version 0.10.26
ubuntu 13.10
The text was updated successfully, but these errors were encountered: