atomist-attic/rug-cli

Detect missing node modules and suggest to run`npm|yarn install`

cdupuis opened this issue · 0 comments

Missing node modules are a constant cause of confusion:

cd-rmbp:<<>>-rugs cd$ rug generate -C ../. -l New<<>>SpringBootProject my-new-project
Resolving dependencies for <<>>:<<>>-rugs (0.1.0·local) completed
  Compiled .atomist/generators/New<<>>SpringBootProject.ts failed
  Compiled .atomist/tests/project/New<<>>SpringBootProjectSteps.ts failed
Compiling source files of <<>>:<<>>-rugs (0.1.0·local) failed
.atomist/generators/New<<>>SpringBootProject.ts(1,25): error TS2307: Cannot find module '@atomist/rug/model/Project'.
import { Project } from "@atomist/rug/model/Project";
                        ^
.atomist/generators/New<<>>SpringBootProject.ts(2,44): error TS2307: Cannot find module '@atomist/rug/operations/Decorators'.
import { Generator, Parameter, Tags } from "@atomist/rug/operations/Decorators";
                                           ^
.atomist/generators/New<<>>SpringBootProject.ts(3,33): error TS2307: Cannot find module '@atomist/rug/operations/ProjectGenerator'.
import { PopulateProject } from "@atomist/rug/operations/ProjectGenerator";
                                ^
.atomist/generators/New<<>>SpringBootProject.ts(4,25): error TS2307: Cannot find module '@atomist/rug/operations/RugOperation'.
import { Pattern } from "@atomist/rug/operations/RugOperation";
                        ^
.atomist/tests/project/New<<>>SpringBootProjectSteps.ts(1,25): error TS2307: Cannot find module '@atomist/rug/model/Project'.
import { Project } from "@atomist/rug/model/Project";
                        ^
.atomist/tests/project/New<<>>SpringBootProjectSteps.ts(4,8): error TS2307: Cannot find module '@atomist/rug/test/project/Core'.
} from "@atomist/rug/test/project/Core";```

The CLI should detect missing node modules and suggest to run `yarn|npm install`.