Skip to content

Commit

Permalink
fix(cli): @cubejs-backend/schema-compiler/scaffolding/ScaffoldingTemp…
Browse files Browse the repository at this point in the history
…late dependency not found
  • Loading branch information
paveltiunov committed May 29, 2019
1 parent 134dc63 commit 4296204
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cubejs-cli/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const displayError = async (text, options = {}) => {
exports.displayError = displayError;

exports.requireFromPackage = async (module) => {
if (!(await fs.pathExists(path.join(process.cwd(), 'node_modules', module)))) {
if (
!(await fs.pathExists(path.join(process.cwd(), 'node_modules', module))) &&
!(await fs.pathExists(path.join(process.cwd(), 'node_modules', `${module}.js`)))
) {
await displayError(
`${module} dependency not found. Please run this command from project directory.`
);
Expand Down

0 comments on commit 4296204

Please sign in to comment.