Error: ENOENT, stat when publishing a Meteor Package


I have a package that works fine locally, but when I try to publish, I get the following Error:

Error: ENOENT, stat '/Users/scotty/Develop/Meteor/Packages/rainhaven:s3/.npm/package/npm-shrinkwrap.json'
    at Object.Future.wait (/Users/scotty/.meteor/packages/meteor-tool/.1.0.41.k8ayjs++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:326:15)
    at Object.wrapper [as stat] (/Users/scotty/.meteor/packages/meteor-tool/.1.0.41.k8ayjs++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/files.js:1124:24)
    at Object.files.copyFile (/Users/scotty/.meteor/packages/meteor-tool/.1.0.41.k8ayjs++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/files.js:473:21)
    at /Users/scotty/.meteor/packages/meteor-tool/.1.0.41.k8ayjs++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/package-client.js:269:11

A google search reveals that it’s generally an issue with node unable to find a file or directory. In this case that would be:


That file definitely exists though, so I’m not really sure what’s causing the Error.
I tried deleting the npm directory and letting meteor rebuild it, but that didn’t seem to help.

Any suggestions or ideas?

Update: I just noticed that right after I run $ meteor publish --create the meteor tools renames the package directory from my:package/.npm/package to my:package/.npm/package-new-1jtl13k when attempting to build and publish the package. As soon as it throws the error, it renames it back to package. It almost seems as though the meteor tool is looking for rainhaven:s3/.npm/package/npm-shrinkwrap.json after that directory has been renamed.


This was actually a mistake on my part.

I had Npm.depends inside the Package.onUse block, and didn’t initially catch it because it worked fine locally.


I know this is an old post, but I didn’t want to create a new one to ask about a very similar problem.

I’m getting the same Error: ENOENT stuff about an icon specified in mobile-config.js (below) when I try to run meteor run ios-device

// Set up resources such as icons and launch screens. App.icons({ 'iphone': 'img/microscope_64px.png', 'iphone_2x': 'img/microscope_256px.png', // ... more screen sizes and platforms ... });

The image file definitely exists. I know when you reference static assets like images contained in the /public directory in a Meteor web app, you’re not supposed to include the public part of the path in the src attribute.

Does that apply for running on a mobile device, also? Or should the call to App.icons() include the public directory in the relative path to the icon file?


Nevermind – I answered my own question.

For anyone who might encounter this type of error when trying to run on an Apple device with
meteor run ios-device,
make sure you include public (no preceding slash) in the App.icons({}) configuration section.


Thanks, this fixed it for me too. Would be nice to see this in the documentation on the Meteor site.