spencer516 / ember-d3-scale

Ember D3 Scale Helpers
MIT License
2 stars 1 forks source link

Cannot find module 'broccoli-funnel' #5

Closed XaserAcheron closed 8 years ago

XaserAcheron commented 8 years ago

Trying to install this via ember-cli, I'm getting a Cannot find module 'broccoli-funnel' error right off the bat.

Looking into it, index.js requires broccoli-funnel and broccoli-merge-trees, but doesn't seem to use either of them (unless their presence invokes some necessary behind-the-scenes magic).

spencer516 commented 8 years ago

Hey — I think I forgot to publish the latest update to fix that. I just cut a new version on npm — can you give it a try and let me know if it works?

(edit: I missed the part about index.js...that's been updated. Latest version should be 0.1.1). Let me know if that works.

XaserAcheron commented 8 years ago

npm install worked this time, but now it errors on runtime:

loader.js:164 Uncaught Error: Could not find module 'd3-scale' imported from 'ember-d3-scale/helpers/linear-scale'

I noticed there was a d3-scale dependency in the ember-d3-scale project, but it didn't get pulled in on npm install. I added it manually just to see if it would help, and unfortunately I'm still getting the error. I have the same version of d3 included in the project already, so I'm not sure what's going on.

Guess this has turned into a general 'build issues' thread, heh. My bad. :P

ghost commented 8 years ago

FWIW, I'm also seeing the same Could not find module 'd3-scale' imported from 'ember-d3-scale/helpers/time-scale' error - and tried a manual install of d3-scale, same as @XaserAcheron, which did not work. I am trying to use ember-d3-scale in an addon project.

spencer516 commented 8 years ago

Hey guys — I'll try to address today. Been busy at work.

spencer516 commented 8 years ago

@zigahertz Can you give it another go? Version 0.1.3 should be a-ok.

ivanvanderbyl commented 8 years ago

Ah man, so sorry about this everyone. I knew this would crop up eventually. We need to add ember-cli-d3-shape as a self installing dependency of ember-d3-scale. Or more ideally, make it install itself in whatever its used in.

ghost commented 8 years ago

@spencer516 this works! thank you very much. Also I think this will let me use ember-cli-d3-shape (I was running into problems with importing this addon into my addon :)

XaserAcheron commented 8 years ago

Welp. New error.

Looks like ember-cli-d3-shape is being pulled in correctly, but there's this malformed path on the include somehow that throws an error when I try and run ember server:

ENOENT: no such file or directory, stat 'C:\Code\JS\Ember\project\node_modules\ember-d3-scale\node_modules\ember-cli-d3-shape\node_modules\d3-array\build\d3-array.j\build\d3-array.js'
Error: ENOENT: no such file or directory, stat 'C:\Code\JS\Ember\project\node_modules\ember-d3-scale\node_modules\ember-cli-d3-shape\node_modules\d3-array\build\d3-array.j\build\d3-array.js'
    at Error (native)
    at Object.fs.statSync (fs.js:844:18)
    at C:\Code\JS\Ember\project\node_modules\ember-d3-scale\node_modules\ember-cli-d3-shape\index.js:66:15
    at Array.forEach (native)
    at Class.module.exports.treeForVendor (C:\Code\JS\Ember\project\node_modules\ember-d3-scale\node_modules\ember-cli-d3-shape\index.js:59:20)
    at Class._treeFor (C:\Code\JS\Ember\project\node_modules\ember-cli\lib\models\addon.js:322:31)
    at Class.treeFor (C:\Code\JS\Ember\project\node_modules\ember-cli\lib\models\addon.js:290:19)
    at C:\Code\JS\Ember\project\node_modules\ember-cli\lib\models\addon.js:244:32
    at Array.map (native)
    at Class.eachAddonInvoke (C:\Code\JS\Ember\project\node_modules\ember-cli\lib\models\addon.js:242:22)
Ember CLI exited: code 1

I'm running Windows, in case that makes a difference. The 'path' in the error message is less than the notorious 260-character path limit, but the ember-cli-d3-shape dependencies run pretty deep so maybe it's a red herring. No idea at this point.

spencer516 commented 8 years ago

@XaserAcheron — 

It looks to me like it might be something going wrong here. Not being on a Windows machine, I can't really debug. Do you think you can put some console.log statements in there and do a little debugging?

It looks like that file will be at the path: C:\Code\JS\Ember\project\node_modules\ember-d3-scale\node_modules\ember-cli-d3-shape\index.js

My guess is that function is returning C:\...node_modules\d3-array\build\d3-array.j when it should be returning C:\...node_modules\d3-array.

Also, if you install ember-cli-d3-shape directly, do you have the same issue?

(fyi @ivanvanderbyl ...not sure if you've tested this on a windows machine or have any clues here...)

ivanvanderbyl commented 8 years ago

I think it's just a path separator issue. Unfortunately I don't have a windows machine to test on, or for CI. But I can make some assumptions about it and get back to you

ivanvanderbyl commented 8 years ago

I'd say it's most likely failing on this stat call https://github.com/ivanvanderbyl/ember-cli-d3-shape/blob/master/index.js#L66

XaserAcheron commented 8 years ago

I'll see if I can spelunk around a bit later today. Gotta balance a few other tasks first.

Thanks for the follow-up!

XaserAcheron commented 8 years ago

Found the root cause: good ol' path separators. It's been fixed in a recent version of ember-cli-d3-shape (see above-linked issue), so updating the dependency to v0.8.1 will solve it.

spencer516 commented 8 years ago

@XaserAcheron — just bumped the version to 0.1.4 that updates the dependency of ember-cli-d3-shape to v0.8.1. Let me know if it's a-okay!

XaserAcheron commented 8 years ago

Excelsior! It works. :beers:

Since it's all settled on my goofy Windows setup and @zigahertz confirmed the original issue was fixed, I suppose this is safe to close. Whoop!