iron-meteor / iron-router

A client and server side router designed specifically for Meteor.
MIT License
1.98k stars 413 forks source link

meteor add fails? #1566

Closed Broham closed 7 years ago

Broham commented 7 years ago

I am attempting to add Iron Router to an existing project that I have, but when I run:

meteor add iron:router

I get the following error:

/Users/abemiessler/.meteor/packages/meteor-tool/.1.1.10.9cuyfx++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
                        throw(ex);
                              ^
TypeError: Object [object Object] has no method 'match'
    at rejectBadPath (/tools/isobuild/isopack.js:18:9)
    at /tools/isobuild/isopack.js:975:9
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/abemiessler/.meteor/packages/meteor-tool/.1.1.10.9cuyfx++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at [object Object]._.extend._loadUnibuildsFromPath (/tools/isobuild/isopack.js:942:7)
    at /tools/packaging/tropohouse.js:500:19
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/abemiessler/.meteor/packages/meteor-tool/.1.1.10.9cuyfx++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at /tools/packaging/tropohouse.js:499:11
    at /tools/utils/buildmessage.js:356:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:349:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:347:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at Object.enterJob (/tools/utils/buildmessage.js:321:26)
    at Object.download (/tools/packaging/tropohouse.js:437:20)
    at /tools/packaging/tropohouse.js:575:22
    at /tools/utils/buildmessage.js:356:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:349:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:347:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at Object.enterJob (/tools/utils/buildmessage.js:321:26)
    at [object Object]._.extend.downloadPackagesMissingFromMap (/tools/packaging/tropohouse.js:572:20)
    at /tools/project-context.js:702:25
    at /tools/utils/buildmessage.js:356:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:349:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:347:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at Object.enterJob (/tools/utils/buildmessage.js:321:26)
    at /tools/project-context.js:701:20
    at /tools/packaging/catalog/catalog.js:100:5
    at /tools/utils/buildmessage.js:268:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:261:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:259:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:250:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at Object.capture (/tools/utils/buildmessage.js:249:19)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (/tools/packaging/catalog/catalog.js:99:31)
    at ProjectContext._.extend._downloadMissingPackages (/tools/project-context.js:700:13)
    at /tools/project-context.js:257:35
    at /tools/utils/buildmessage.js:356:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:349:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:347:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at Object.enterJob (/tools/utils/buildmessage.js:321:26)
    at ProjectContext._.extend._completeStagesThrough (/tools/project-context.js:247:18)
    at ProjectContext._.extend.saveChangedMetadata (/tools/project-context.js:235:10)
    at ProjectContext._.extend.prepareProjectForBuild (/tools/project-context.js:240:10)
    at /tools/cli/commands-packages.js:1996:20
    at /tools/utils/buildmessage.js:268:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:261:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:259:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at /tools/utils/buildmessage.js:250:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
    at Object.capture (/tools/utils/buildmessage.js:249:19)
    at Command.main.registerCommand.name [as func] (/tools/cli/commands-packages.js:1995:27)
    at /tools/cli/main.js:1378:23

Can anyone see why this is happening and how I can get around it?

mstrlaw commented 7 years ago

In case you have other packages installed as well, try installing iron router on a fresh project to see if you get the same error (it can be package conflicts). Also, what Meteor version are you using?

Broham commented 7 years ago

I was able to install on another project. I am running Meteor 1.2.1

Broham commented 7 years ago

Here is a list of packages installed on the problem project:

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

# Mandatory
meteor-base             # Packages every Meteor app needs to have
mobile-experience       # Packages for a great mobile UX
mongo                   # The database Meteor supports right now
session                 # Client-side reactive dictionary for your app
jquery                  # Helpful client-side library

# Deployment
standard-minifiers      # JS/CSS minifiers run for production mode
es5-shim                # ECMAScript 5 compatibility for older browsers.
ecmascript              # Enable ECMAScript2015+ syntax in app code

styles-base
birt:core
birt:ui
birt:info
birt:scrubber
eha:nojs-banner
meteorhacks:aggregate
simple:reactive-method

Am I overlooking a potentially conflicting routing package?

mstrlaw commented 7 years ago

I don't see any package related to routing. I once got a similar issue. I think I solved it by removing all the packages I had installed, installing IR, then re-installing all packages again on by one. Try to do that on the project you installed IR successfully to see if that works.

xiaochen-NEU commented 7 years ago

Hi, I got the same error message and when I tried to add iron:router to a new app, it failed... I'm using Meteor 1.2.1 ,too.

mstrlaw commented 7 years ago

Yes it seems on 1.2.1 the install or IR fails.. The only way I got it to work is by using a Meteor version > than 1.2..

chrisbutler commented 7 years ago

i can't reproduce this... closing until anyone has something more concrete