You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does not always work with yarn workspaces / monorepos #70
I'm running into problems with ember-cli-version-checker with the following setup: I have a monorepo with an engine, that uses @ember-decorators/babel-transforms to enable decorators. The engine uses ember-cli-babel@7, which babel-transforms checks for using ember-cli-version-checker. This works for the engine itself, however it does not work for the engine's dummy app.
Here's why: the dummy app is an instance of EmberAddon and has no root property. Therefore basedir is undefined.
This means that require.sync determines the basedir using the physical location of the caller file, npm-dependency-version-checker.js in that case:
varbasedir=opts.basedir||path.dirname(caller());
And this is where it breaks. ember-cli-version-checker has been hoisted to the workspace root, consequently resolve will start the lookup from there. However, the version of ember-cli-babel@7 that is used by the engine has not been hoisted. Instead, ember-cli-babel@6 has been hoisted.
I just hit this bug. It gets reproduced if you try to use ember-decorators when ember-cli-babel needs to be resolved relative to a non-default basedir. This is the VersionChecker that fails:
In case anyone comes across this in the future: @ember-decorators/babel-transforms just released 5.1.2 that bumps the ember-cli-version-checker version and (should) fix this issue if you're using that package.
Activity
buschtoens commentedon Nov 21, 2018
I am no ember-cli wizard, but I would guess, that we could just do this:
The slightly safer way would be to use
get-project, however that would potentially throw an error. But maybe this is what we really want?ef4 commentedon Nov 26, 2018
I just hit this bug. It gets reproduced if you try to use ember-decorators when ember-cli-babel needs to be resolved relative to a non-default basedir. This is the VersionChecker that fails:
https://github.com/ember-decorators/ember-decorators/blob/d96c7c86a36f242a2c8b52d3add333baeeeab947/packages/babel-transforms/index.js#L20
alexlafroscia commentedon Jan 23, 2019
In case anyone comes across this in the future:
@ember-decorators/babel-transformsjust released5.1.2that bumps theember-cli-version-checkerversion and (should) fix this issue if you're using that package.