Windows 10 x64 - Meteor upgrade NO APPLICATION

I seem to have terrible luck with Meteor and changing versions. Ever since upgrading (well rip and reinstall with the new installer) I get the following every time I try to run my application:

=> Started MongoDB.
W20171128-20:08:00.743(-6)? (STDERR) C:\Users\xxx\AppData\Local\.meteor\packages\meteor-tool\1.6.0\\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20171128-20:08:00.959(-6)? (STDERR)                                            throw(ex);
W20171128-20:08:00.961(-6)? (STDERR)                                            ^
W20171128-20:08:00.962(-6)? (STDERR)
W20171128-20:08:00.963(-6)? (STDERR) Error: Cannot find module 'meteor/tools'
W20171128-20:08:00.964(-6)? (STDERR)     at Function.Module._resolveFilename (module.js:513:15)
W20171128-20:08:00.965(-6)? (STDERR)     at Function.resolve (internal/module.js:18:19)
W20171128-20:08:00.966(-6)? (STDERR)     at Object.require (C:\Users\xxx\meteor\\.meteor\local\build\programs\server\boot.js:287:32)
W20171128-20:08:00.969(-6)? (STDERR)     at makeInstallerOptions.fallback (packages\modules-runtime.js:651:18)
W20171128-20:08:00.970(-6)? (STDERR)     at require (packages\modules-runtime.js:244:16)
W20171128-20:08:00.977(-6)? (STDERR)     at base.js (imports/startup/server/devices/customer/base.js:1:308)
W20171128-20:08:00.980(-6)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20171128-20:08:00.981(-6)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20171128-20:08:00.981(-6)? (STDERR)     at index.js (imports/startup/server/devices/index.js:1:14)
W20171128-20:08:00.982(-6)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20171128-20:08:00.985(-6)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20171128-20:08:00.986(-6)? (STDERR)     at index.js (imports/startup/server/index.js:1:321)
W20171128-20:08:00.988(-6)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20171128-20:08:00.989(-6)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20171128-20:08:00.990(-6)? (STDERR)     at main.js (server/main.js:1:14)
W20171128-20:08:00.991(-6)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
=> Exited with code: 1

Have tried MANY options, have not tried meteor reset as I have a lot of “data” in the application to make it run. Suggestions?

Can I run meteor reset, see if it works and then stop / copy my db folder back over?


As long as you copy the db folder somewhere safe first. Then do meteor reset and copy back!

Have you installed nodejs separately? I know it shouldn’t make a difference, but I have seen similar issues to this on Windows, where Meteor seemed to be using the wrong node version. If you have, try uninstalling node (or removing from the PATH variable), so it can’t be found.

Unfortunately meteor reset with copying the database and just meteor reset with no copying of the database did not fix the issue. It still fails with the same errors either way.

Also, I do have Node.js installed on its own (v8.8.1 to stay synced with Meteor) and have tried uninstalling that, though at best this would have been a TEMPORARY fix as I use node for other development. This did not work either unfortunately, same error.

Really need this application to be able to continue development, but need tools that can stay current! Addition suggestions please?

Honestly, sounds like a corrupted Meteor tool or something like that. Try backing up your dev database and reinstalling Meteor.

mongodump -h localhost:3001 -d meteor
choco install meteor
# once you see the "started MongoDB" you can restore the db
# default dir for mongodump output is "dump"
mongorestore -h localhost:3001 -d meteor dump

I googled meteor stderr -6 and not found -6 result yet but a similiar update problem and simple solution here -
Meteor crash after meteor update
Now found some -6 cases but seems there are various causes, and I couldn’t find any explanation on -6.

@leosco: We are just running mongo bundled with Meteor so no mongodump available. However, we have installed meteor again though we need to add --force as it recognizes that it is installed. This completed successfully.
The tried starting the application as usual, it needs to do a bunch of package reinstalls and hung on templating-compiler@1.3.3, left it running 60+ minutes, finally ended the task! Started again, got past that and then seemed to hang at fourseven:scss@4.5.4 for a while, but made it through. Finally, though the end result was the same error I started with.

@jwkim: running the meteor update --release 1.6 just results in it giving us the message: The project is already at Meteor 1.6.

Thanks for the suggestions, really hate that Windows seems so fragile for Meteor,

Yes I know --force option I come to use it once before…anyway that’s too bad. I thought you were able to finally made it.
I think we need some cleaning guidelines. Seems almost impossible to resolve this.

@lweidig it’s not necessarily a Windows problem, however the upgrade process can be prone to issues from Meteor pre-1.6 to 1.6.

By default all pre-1.6 installs were 32 bit, but now the chocolatey package is by default to whatever your OS is, in your case 64 bit. Personally, I encountered a similar problem to yours because I had upgraded to Meteor 1.6 64 bit on my machine and tried to run a pre-1.6 version project. Even if you run meteor update it’ll crash because it’s looking for the 32 bit meteor-tool and isn’t able to perform any Meteor functions at all.

You need to uninstall Meteor completely using choco, and probably delete (or rename if you’re in a hurry) the %LocalAppData%\.meteor directory so you have a clean slate.

Then you need to reinstall Meteor for 32 bit Windows, the long way. See here:

Once that’s done, run meteor update in the project you’re trying to run so all your stuff is updated gracefully without meteor-tool version conflicts. You should then be able to migrate to the 64 bit version automatically by running choco install meteor again.

The 1.6 release notes do explicitly say to run meteor update first on your pre-1.6 version projects before doing a fresh Meteor install with choco, but I guess they should make that super explicit, because it’s causing people all sorts of problems.

1 Like

Wow very good explanation and solution. I’m also in 64 bit windows and not upgrading. (I also knew there exist the 32 bit problem.) Your comment will be a guideline for me.

@leosco: Tried this process and removed all of the 64-bit meteor. Went through long way install for 32-bit ran meteor update and decided to try application. Got the exact same error in 32 bit now - YIKES.

Restored my application to the 1.5.2_2 version (thought I was at 1.5.4 but guess not). Ran application which of course started the download of meteor-tool@1.5.2_2… This hangs and then I get:

      throw error;

Error: EPERM: operation not permitted, unlink 'C:\Users\xxx\meteor\\.meteor\local\dev_bundle'
    at Error (native)
    at Object.fs.unlinkSync (fs.js:932:18)
    at exports.makeLink (C:\tools\cli\dev-bundle-links.js:20:8)
    at [object Object]._.extend.ensureDevBundleLink (C:\tools\project-context.js:1509:7)
    at [object Object]._.extend._readFile (C:\tools\project-context.js:1443:10)
    at new exports.ReleaseFile (C:\tools\project-context.js:1393:8)
    at C:\tools\cli\main.js:898:22

Guess we will explore this raddit hole for a while…

At this point I seem to have a completely useless system. Can’t use 32 or 64 bit any longer.

It’s not the same error, though. You’re getting EPERM which means there’s a permissions problem. You shouldn’t have to run meteor as administrator though. Maybe just try it this time to see if you’re able to start the app and at least run meteor update.

1 Like

Ok, I feel foolish but I am one to accept my issues. I looked at code and found this actual line in the code:

import { Package } from 'meteor/tools';

Though I have NO clue how that was added! It is not in my git commit right before upgrading to 1.6 though. Removed this an things were happy. I appreciate all of the help and again apologize for wasting valuable time. Thanks!

Man, if I’d only seen that before I assumed your install was broken

1 Like