-
Notifications
You must be signed in to change notification settings - Fork 3
uses mkdirp
, not available on 3 machines that I have tried to install biojs libs (build with slush-biojs) on
#13
Comments
sh: mkdirp: command not found |
Found the issue, the mkdirp is put into the dev dependencies, even though in production you would still need the lib to be built. I think it would be worth moving that from dev-dependencies to dependencies in the output package.json |
Forwarded this to Dennis |
Hey Martin. Feel free to issue a pull request if you know how to change this. Otherwise I'm happy to do it myself. |
Just found out, doing a normal install (with dev deps) does not help ether. Just passed my project that that a lib (made with biojs-slush) to travis and it cant build ether. My project: https://github.com/TeamMacLean/geefu.io/blob/master/package.json which includes: gives the following error on my machines and travis:
|
My assumption is that biojs-slush makes mkdirp and browserify a dep of the lib that is generated and that it expects to use both of these from the node_modules/.bin folder but because it is a package on top of this that is being built it does not look in that .bin folder, instead it looks in the one of the top level package. |
Just tested this, |
Mhm we're currently in our team meeting. I will take a look at this after. You could try my packages, they are created using slush-biojs if that's what you mean. They are called mplexnet and mplexviz-ngraph (also don't judge my bad coding). |
ill give them a go now and let you know. |
yep, same issue with mplexnet, if I install it on its own it is fine (I assume it can see browserify and mkdirp in its .bin folder) but if installed a part of another project it fails. steps to test:
(make sure browserify and mkdirp are not installed globally before testing or it will give false results) |
We ran into this problem before. One solution is to include browserify and mkdirp in the dependencies. But that will include dev tools in your build and especially browserify is a pretty big package. We didn't come up with a solution yet. I think what we would need to do is to install the necessary build tools without including them in the actual bundle file. Do you know of any good way to do that? |
I can only think or dirty, hacky ways, not ideal. |
I came up with the same conclusion and then forgot about it. How about including a bash script with slush-biojs that will be called in the build command to check if mkdirp and browserify are available and install them if necessary? I'm thinking of something like:
|
Mhm that would of course only work on unix-like environments |
You could just not force browserify... |
So give people the choice to use their own bundling system or not use require? I could add that to the generator. |
Not completely sure about it, but I think browserify is needed for the On Mon, Dec 7, 2015 at 12:11 PM Dennis Schwartz [email protected]
|
guys - have a look here: https://docs.npmjs.com/misc/scripts I guess your issue is the difference of
Well you are not the first one who complains ;-) |
So glad I am not the only person that dislikes forcing browserify. It should be 100% optional to the end user for many reasons but the biggest is: |
Yep webpack and other tools are great too ;-)
"Pre browserification" is really something optional, since there are service like wzrd.in that do this automatically -> I am afraid, but you have to run browserify yourself if you want to bundle them ;-) |
These is also the options to handle dependencies yourself, flat style, I prefer this approach as there are no worries about duplicate imports. Works well with tools like bower. <script src="/jquery.js"> <script src="/d3.js"> <script src="/lodash.js"> <script src="/vis.js"> //depends on the above 3 libs and nothing else. verbose and simple. _feels like an unhip old man_ |
What kind of environment would you like to handle dependencies yourself? PS: After our talk I also vote for us to include bower as a form of publishing components. I will send around an email with a summary of our discussion soon. |
If you want to discuss about future dependency management, please head over to biojs/biojs3#4
How old is your npm version? Npm supports flat dependencies since spring this year |
I like the idea of having a 'dist' or 'build' folder with: |
I am using the latest npm with its flat style, what I meant is that all depencencies are not bundled into the library, so I can |
Well I don't know how the vanilla js file would look like since a lot of components have require in their code? |
the same but without 'require'. find('require(*)').replace(''); |
No description provided.
The text was updated successfully, but these errors were encountered: