Error: EXDEV, rename

I have a Meteor app that works perfectly on Mac OS X and used to work perfectly on Linux. However, now when I do a build I get the following errors. The install uses Node 0.10.36. Any suggestions? Thanks :smile:

/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: EXDEV, rename '/opt/meteor/src/.meteor/local/isopacks/npm-containerā€™
at Object.Future.wait (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:398:15)
at Object.wrapper [as rename] (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/files.js:1350:24)
at Object.files.renameDirAlmostAtomically (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/files.js:810:11)
at [object Object]..extend.complete (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/builder.js:482:11)
at [object Object].
.extend.saveToPath (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack.js:1075:15)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack-cache.js:236:21
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:352:18
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:345:34
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:343:23
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.enterJob (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:317:26)
at [object Object].
.extend.loadLocalPackage (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack-cache.js:198:18)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack-cache.js:149:14
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:352:18
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:345:34
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:343:23
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.enterJob (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:317:26)
at [object Object]..extend.ensurePackageLoaded (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack-cache.js:141:20)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack-cache.js:63:14
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/package-map.js:50:7
at Function.
.each.
.forEach (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
at [object Object]..extend.eachPackage (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/package-map.js:42:7)
at [object Object].
.extend.buildLocalPackages (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/isopack-cache.js:62:24)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/project-context.js:698:25
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:352:18
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:345:34
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:343:23
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.enterJob (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:317:26)
at ProjectContext.
.extend.buildLocalPackages (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/project-context.js:697:18)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/project-context.js:238:35
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:352:18
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:345:34
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:343:23
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.enterJob (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:317:26)
at ProjectContext..extend.completeStagesThrough (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/project-context.js:228:18)
at ProjectContext.
.extend.saveChangedMetadata (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/project-context.js:216:10)
at ProjectContext.
.extend.prepareProjectForBuild (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/project-context.js:221:10)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands.js:793:20
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:264:13
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:257:29
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:255:18
at [object Object]..extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:246:23
at [object Object].
.extend.withValue (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.capture (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:245:19)
at Object.main.captureAndExit (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js:271:29)
at buildCommand (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands.js:792:8)
at Command.main.registerCommand._.extend.name [as func] (/root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands.js:746:12)
at /root/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js:1363:23
- - - - -

This has been sitting on Stack Exchange for a while and nobody has any idea what this is. So, can anyone give any kind of hint as to where to start?

It looks like you have installed Meteor to your root directory, this is a bad idea and is probably because you ran the Meteor install command as root or with sudo. It means that npm which is not installed with root privileges does not have permission to access the root directory. My advice is to delete the /root/.Meteor directory and the Meteor symlink and reinstall Meteor as a regular user.

Thanks, most appreciated :slight_smile: Well, this I donā€™t understandā€¦ Meteor is installed as follows:

curl https://install.meteor.com/
cd /opt/meteor/src
meteor build --directory /tmp/meteor

After the ā€œinstallā€ I get the following message:

Meteor 1.1.0.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.

So, how/where/why do components get installed into root? Thanks.

As a note, all the above is inside a Docker implementation, that used to work perfectlyā€¦

Oh, Docker complicates things. Could you post your Dockerfile and which base image you are using, please. Installing in root is not so surprising now if you are using docker, but there are any other number of problems that can arise. I didnā€™t realise this was for a production deployment.

The Dockerfile is pretty complex and starts a large number of other services, not only Meteor, so below is a cut down version of just the Meteor bits. The full Ubuntu implementation is used for these other services. This same configuration has been running perfectly for 3-4 months without change. The <> tag is just where I have taken out the actual addresses.

FROM ubuntu:14.04

RUN apt-get update -y && apt-get install --no-install-recommends -y -q build-essential ca-certificates curl fontconfig git gccclibfreetype6 libfreetype6-dev libssl-dev make nano python wget

ENV MONGO_URL <>
ENV PORT 8080
ENV ROOT_URL <>

RUN mkdir /opt/nodejs && curl http://nodejs.org/dist/v0.10.36/node-v0.10.36-linux-x64.tar.gz | tar xvzf - -C /opt/nodejs --strip-components=1 && ln -sf /opt/nodejs/bin/node /usr/bin/node && ln -sf /opt/nodejs/bin/npm /usr/bin/npm
WORKDIR /usr/local/share/

RUN curl https://install.meteor.com/ | sh

COPY meteor/app/ /opt/meteor/src

WORKDIR /opt/meteor/src
RUN meteor build --directory /tmp/meteor
RUN cd /tmp/meteor/bundle/programs/server/ && npm install
RUN mv /tmp/meteor/bundle /opt/meteor/app

EXPOSE 80 443
EXPOSE 22

ENTRYPOINT bash /opt/meteor/scripts/run_app.sh

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /tmp/meteor && rm -rf ~/.meteor && rm /usr/local/bin/meteor

I have made it simplerā€¦the following will generate the error.

FROM ubuntu:14.04

RUN apt-get update -y && apt-get install --no-install-recommends -y -q build-essential ca-certificates curl fontconfig git gcc libfreetype6 libfreetype6-dev libssl-dev make nano python wget

RUN mkdir /opt/nodejs && curl http://nodejs.org/dist/v0.10.36/node-v0.10.36-linux-x64.tar.gz | tar xvzf - -C /opt/nodejs --strip-components=1 && ln -sf /opt/nodejs/bin/node /usr/bin/node && ln -sf /opt/nodejs/bin/npm /usr/bin/npm

WORKDIR /usr/local/share/

RUN curl https://install.meteor.com/ | sh

COPY meteor/app/ /opt/meteor/src
WORKDIR /opt/meteor/src
RUN meteor build --directory /tmp/meteor

In the end I built using Mac OS X and then downloaded the completed build to Linux. This was suggested to me on Stackoverflow and it works perfectly.