Strange Error when publishing package that uses Npm.depends

Trying to publish a package that uses the mongodb-diff package. meteor publish dies with the following error:

updating npm dependencies -- mongodb-diff...
/home/copleykj/.meteor/packages/ecmascript/.0.6.3.1ax5r61++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^

Error: ENOENT: no such file or directory, lstat '/home/copleykj/projects/JavaScript/socialize/socialize-base-model/.npm/package'
    at Error (native)
    at Object.fs.lstatSync (fs.js:839:18)
    at Object.realpathSync (fs.js:1439:21)
    at Object.wrapper [as realpath] (/tools/fs/files.js:1535:35)
    at Builder.copyDirectory (/tools/isobuild/builder.js:594:16)
    at /tools/isobuild/isopack.js:1446:17
    at Function._.each._.forEach (/home/copleykj/.meteor/packages/meteor-tool/.1.4.3_1.91supr++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
    at /tools/isobuild/isopack.js:1445:9
    at [object Object].saveToPath (/tools/isobuild/isopack.js:1191:9)
    at bundleBuild (/tools/packaging/package-client.js:361:11)
    at /tools/packaging/package-client.js:401:20
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at createBuiltPackage (/tools/packaging/package-client.js:400:16)
    at Object.exports.publishPackage (/tools/packaging/package-client.js:823:26)
    at /tools/cli/commands-packages.js:441:21
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.main.captureAndExit (/tools/cli/main.js:271:29)
    at Command.func (/tools/cli/commands-packages.js:437:8)
    at /tools/cli/main.js:1483:23

Hopefully someone has some sort of idea how to solve this…

Another couple notes on this… the files in the .npm directory are being wiped out by the publish command. If I restore them via git checkout and run it again, it erases them again without updating them… If I symlink a the package from the packages folder of a meteor project that uses the package and then meteor run the project, the files in .npm are updated correctly and the project runs. Trying to publish after this still yields the same error though.

@sashko @benjamn, maybe you guys can shed some light on this?

have you figured it out? I hit the same issue

Haha, omg I don’t remember at this point. It’s been so long and there’s been a couple billion lines of code and thousands off issues like this run through my head since then.