Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to clone Git repository - "Object function ... has no method 'hasMagic'"

Tags:

ember-cli

I am trying to clone a Git repository, which contains an Ember-CLI project (https://github.com/tgfischer/StockMarketApp). When I do that, I get the following error:

tom@tom-fischer:~/Desktop/StockMarketApp$ ember server
version: 0.2.0-beta.1
Could not find watchman, falling back to NodeWatcher for file system events
Livereload server on port 35729
Serving on http://0.0.0.0:4200/
Object function glob(pattern, options, cb) {
  if (typeof options === "function") cb = options, options = {}
  if (!options) options = {}

  if (typeof options === "number") {
    deprecated()
    return
  }

  var g = new Glob(pattern, options, cb)
  return g.sync ? g.found : g
} has no method 'hasMagic'
TypeError: Object function glob(pattern, options, cb) {
  if (typeof options === "function") cb = options, options = {}
  if (!options) options = {}

  if (typeof options === "number") {
    deprecated()
    return
  }

  var g = new Glob(pattern, options, cb)
  return g.sync ? g.found : g
} has no method 'hasMagic'

    at rimraf (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rimraf/rimraf.js:57:13)
    at lib$rsvp$node$$tryApply (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1467:11)
    at lib$rsvp$node$$handleValueInput (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1567:20)
    at fn (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1555:18)
    at /home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/index.js:100:14
    at lib$rsvp$$internal$$tryCatch (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16)
    at lib$rsvp$$internal$$invokeCallback (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17)
    at lib$rsvp$$internal$$publish (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11)
    at Object.lib$rsvp$asap$$flush [as _onImmediate] (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1290:9)
    at processImmediate [as _immediateCallback] (timers.js:330:15)

Here are the steps I am following:

git clone https://github.com/tgfischer/StockMarketApp
cd StockMarketApp
bower install
npm install
ember server

ember server runs the project, and generates the error above.

When I run the version of the project that is locally on my computer (The project that is pushing to this repository), it works correctly. I've tried uninstalling/reinstalling Bower, Ember-CLI, PhantomJS. I've also tried cloning this project on my Windows parition without success.

Does anyone know what might be going wrong? Thanks for the help.

like image 981
TFischer Avatar asked Mar 10 '15 17:03

TFischer


1 Answers

Looks like a [email protected] issue I just fixed it changing the package.json to use a version that was working for me

Instead of "glob": "^4.0.5" use "glob": "4.4.0"

Then reinstall you packages

npm cache clean rm -rf node_modules npm install

([email protected] works for me with the default glob version, you are using the 0.2.0-beta.1 maybe if you update ember-cli it will work)

like image 77
juan Avatar answered Jun 26 '23 21:06

juan