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

.enb/make.js called twice #8

Open
iniel opened this issue Aug 22, 2016 · 1 comment
Open

.enb/make.js called twice #8

iniel opened this issue Aug 22, 2016 · 1 comment

Comments

@iniel
Copy link
Contributor

iniel commented Aug 22, 2016

Hi!
It seems that .enb/make.js called twice and it's not ok.

Two tasks run in index.js.

magicPlatform.runTasks(['examples', 'docs'])

So in enb-magic-factory makePlatform inits twice, for docs and for examples.

...
MakePlatform = require('enb/lib/make'),
...
MagicHelper.prototype._buildTargets = function (toBuild, nodes, targets) {
    ...
    return makePlatform.init(root)
    ...
}

It means enb/lib/make calls make.js(examples and docs configuration) twice.

require(makefilePath)(projectConfig);

It becomes a problem when enb-bem-examples configuration calls pseudo-level-builder and it creates symlinks asynchronously. Sometimes you may get an error like:

17:40:54.094 - build failed
Error: EEXIST: file already exists, symlink '../../../../../../../../../../lib/yamoney-bem-components/common.blocks/page-layout/page-layout.examples/blocks' -> '{some_path}/yamoney-bem-site/node_modules/bem-lib-site/node_modules/bem-lib-site-data/tmp/data/yamoney-bem-components/desktop.examples/page-layout/10-main/page-layout.blocks'
    at Error (native)
@tadatuta
Copy link
Member

tadatuta commented Sep 7, 2016

It's enb/enb-bem-docs#51 and there's nobody who is brave enough to fix it :(

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

No branches or pull requests

2 participants