Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'dist' #65

Closed
halhenke opened this issue Aug 3, 2015 · 11 comments
Closed

Cannot find module 'dist' #65

halhenke opened this issue Aug 3, 2015 · 11 comments

Comments

@halhenke
Copy link

halhenke commented Aug 3, 2015

Just upgraded to 0.4 - was having problems with 0.3.3/0.3.4 that seemed to be related to the Node 0.12 template string issue you noted in fly-utils.

Switched to iojs 2.3.4 and reinstalled/rebuilt everything. Now I'm getting this when trying to use the CLI:

Error: Cannot find module '/Users/me/my_project/dist'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Function.Module.runMain (module.js:471:10)
    at startup (node.js:117:18)
    at node.js:948:3

I've tried naming the Flyfile - Flyfile.babel.js & later - Flyfile.js, flyfile.js as this issue seemed to recommend: #64

On OS X 10.10.4

@ghost
Copy link

ghost commented Aug 3, 2015

@halhenke I still need to get the build to pass the tests, should be done soon but in the mean time check out the release notes.

  • just name your flyfiles Flyfile.js or flyfile.js
  • if you are hacking / developing / forking fly-util or fly make sure you read this.

I will get back to you when I am done dealing with the test breakage 😄

@halhenke
Copy link
Author

halhenke commented Aug 3, 2015

Thanks for the help.

Just want to say I really like what you are trying to do with this project - been checking out this and gobble and i like the ideas - hope one of them takes off. Would love to try and help out on this once I get my head around it.

👍

@ghost
Copy link

ghost commented Aug 3, 2015

I studied Gobble before embarking in Fly and more recently tried to reach the author with no success.

So, I ended up rolling my own because I wanted generators and promises to be prominent features of the build system and a simpler way to make plugins.

I removed template strings from fly tests and other es6 features (minus arrow funcs and gens obviously) so tests are passing in node v0.12 too.

Back to your issue, what were you trying to do?

  • build fly itself
  • use fly to build a sample project

@ghost ghost added the more info label Aug 3, 2015
@ghost
Copy link

ghost commented Aug 3, 2015

@halhenke Most likely fixed! Please try again 😄

@ghost ghost added the bug label Aug 3, 2015
@halhenke
Copy link
Author

halhenke commented Aug 3, 2015

@bucaran Yep that did it! 😄

@ghost
Copy link

ghost commented Aug 3, 2015

😅 Awesome! Closing then. See you on the other side.

@ghost ghost closed this as completed Aug 3, 2015
@halhenke
Copy link
Author

halhenke commented Aug 3, 2015

I was just using fly in a sample project. Think i first read about it in your post on the Gobble issue list.

Yeah it looks like Gobble hasnt been updated in a while. I've had a few weird issues with it like build files refusing to update. But the idea of being easily able to make plugins is really important IMO.

To be honest I haven't really given proper thought to what differences a generator-centric system might have when compared to something built around streams a la gulp but I'm interested to see where it leads (and trying to play around with more ES6 features anyway).

Love the no semi-colons rule also! 😄

@ghost
Copy link

ghost commented Aug 3, 2015

Well, IMO gulp introduced streams into the mainstream so I give them that, and other than cosmetic differences the syntax is just a bit more verbose than Fly, but using streams makes writing plugins a real PITA. In more subjective territory, I thought it would be nice to write everything in ES6 in a more functional style, thus Fly's source code makes almost no use of variables 😀

< rant >
In gulp, everything is about being asynchronous, but you must have gotten this a few times already:

[gulp] Error in plugin 'gulp-uglify': Streaming not supported

Streaming in gulp, well, no. Sure, you can use more and more plugins to mitigate any issues, but the real issue is that JavaScript is single threaded and most transformations you can apply to text are sync. Also, stuff like linting and test do not fit the stream paradigm so well, or just not at all.

With Fly I thought I want to take advantage of async IO by yielding promises inside generators, but also want to use non-stream-based async operations like linting, testing and sync filters with the same interface and without callback hell. Turns out all of that can be expressed with promises very simply.

Gulp is also about "just 5 commands", but the reality is those commands hide the complexity of VinylFS and the poorly documented orchestrator

@iamstarkov
Copy link
Contributor

valid point about "orchestrator"

@iamstarkov
Copy link
Contributor

btw, can you point me, how to run fly tasks sequential and in parallel?

@ghost
Copy link

ghost commented Aug 3, 2015

@iamstarkov Assuming you have already written tasks that can be expressed concurrently:

yield this.start(a, b, c, { parallel: true })

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants