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

Fail building the project: Cannot find multiple modules #591

Closed
EvsChen opened this issue Sep 16, 2018 · 8 comments
Closed

Fail building the project: Cannot find multiple modules #591

EvsChen opened this issue Sep 16, 2018 · 8 comments

Comments

@EvsChen
Copy link
Contributor

EvsChen commented Sep 16, 2018

I'm new to webpack-cli and clone this project to build locally.

Describe the bug

I follow the instruction in CONTIBUTING.md and run the following.

yarn install 
yarn link 
yarn link webpack-cli

Everything works well and no errors.

Then I run yarn test to make sure everything is installed well. Then the TS2307 error: Cannot find module comes out.

What is the current behavior?

I just paste some of the first missing modules here, but the list is a lot longer.

> webpack-cli@3.1.0 build /Users/chenshenyue/webpack-cli
> tsc

packages/add/index.ts:1:30 - error TS2307: Cannot find module '@webpack-cli/generators/add-generator'.

1 import defaultGenerator from "@webpack-cli/generators/add-generator";
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


packages/add/index.ts:2:32 - error TS2307: Cannot find module '@webpack-cli/utils/modify-config-helper'.

2 import modifyConfigHelper from "@webpack-cli/utils/modify-config-helper";
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


packages/generate-loader/index.ts:1:29 - error TS2307: Cannot find module '@webpack-cli/generators/loader-generator'.

1 import LoaderGenerator from "@webpack-cli/generators/loader-generator";
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


packages/generate-loader/index.ts:2:25 - error TS2307: Cannot find module 'yeoman-environment'.

2 import * as yeoman from "yeoman-environment";

To Reproduce
Just follow the CONTIBUTING guide to setup the project using yarn as I listed before.

Additional context
node version: 8.12.0
yarn version: 1.7.0
npm version: 6.4.1

@ematipico
Copy link
Contributor

Hi!

In order to build the project you have to run the bootstrap command as well. We use lerna to orchestrate the packages

@EvsChen
Copy link
Contributor Author

EvsChen commented Sep 16, 2018

Thanks a lot @ematipico ! That's the missing piece I'm looking for. Would it be better to mention it in the CONTRIBUTING.md? Otherwise it seems misleading for newcomers.

@ematipico
Copy link
Contributor

Totally legit! Feel free to send a PR if you want :)

@evenstensberg
Copy link
Member

CC @fokusferit #591 (comment)

@EvsChen
Copy link
Contributor Author

EvsChen commented Sep 17, 2018

Sure. I'll send a PR for this.

EvsChen pushed a commit to EvsChen/webpack-cli that referenced this issue Sep 17, 2018
@EvsChen
Copy link
Contributor Author

EvsChen commented Sep 17, 2018

I used the wrong email to commit so I reopen another one. The cla bot informs me that I have to sign the CLA first. But the link it gives doesn't work.
https://cla.js.foundation/webpack/webpack-cli?pullRequest=597

@ematipico
Copy link
Contributor

It does work for me

@EvsChen
Copy link
Contributor Author

EvsChen commented Sep 17, 2018

Don't know why it fails. I use some proxy and it finally works. Could you please help to review my PR? @ematipico

ematipico pushed a commit that referenced this issue Sep 18, 2018
* docs: fix the setup workflow #591

* docs: change to npm script

* docs: script change

* docs: simplify script
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

3 participants