-
Notifications
You must be signed in to change notification settings - Fork 1k
docs(contributing): add setup instructions #3114
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
base: master
Are you sure you want to change the base?
Conversation
… steps for project pre-requisites, installtion, and building
CONTRIBUTING.md
Outdated
### "Module not found" Fix | ||
|
||
**Note: Be sure to build the project in its original state first before contributing new code changes and following this.** | ||
|
||
In case you rebuild the project from the project root directory with new changes by `yarn build` and you run into issues relating to a missing module of `index.js` in the relative `dist` directory, this may be caused by `rimraf` behavior with the current location of relative paths. This can be fixed by the following: | ||
|
||
1. Navigate into `package.json` under the relevant folder with code changes. | ||
(e.g. If your new code changes are in `./packages/core`, go into that `package.json`) | ||
|
||
2. Update "scripts" for `yarn clean` and give it the actual relative path. | ||
|
||
Example: | ||
```json | ||
"clean": "rimraf packages/core/dist", | ||
``` | ||
**Note: Do not include this as a commit.** | ||
|
||
3. If there is a `dist` folder within the relative path, delete it manually. | ||
|
||
4. Try rebuilding the Crawlee project again using `yarn build`. | ||
|
||
If the fix is successful, you should be able to build the project without any issues. You do not need to manually delete the generated `dist` folder again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this sounds like something to fix instead of documenting it. can you describe what exactly did happened? rimraf dist
should work just fine even if the folder is not present, our CI would fail if that would be the case.
CONTRIBUTING.md
Outdated
|
||
- [Node.js](https://nodejs.org/en) >= 16.0.0 (recommended: v22.17.0) | ||
|
||
- [Yarn](https://yarnpkg.com/) >= 4.0.0 (recommended: v4.8.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont "recommend" a version, users need to use the exact version provided in the packageManager
field in package.json
.
CONTRIBUTING.md
Outdated
|
||
```shell | ||
corepack enable | ||
corepack prepare yarn@stable --activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik this shouldnt be needed, we do it in the CI but locally i dont think i even had to run this myself
…nd building instructions - Update Node.js and Yarn version requirements to be more accurate - Simplified corepack setup instructions
Hi @B4nan, Thanks for reviewing! Each of us ran into a similar build issue when we attempted to rebuild the project with any change in general with an error related to gen-esm-wrapper not finding the I also thought that However, another fix I found working but would always include more steps was the the following:
I could always ticket a new issue with the error log included if you are interested. When we found the rimraf fix, we did not know whether to include it as a potential change in the codebase. |
…nd building instructions - Update Node.js and Yarn version requirements to be more accurate - Simplified corepack setup instructions
This feels like something weird happened on your end, and you are trying to randomly find the culprit (so which one is it, gen-esm-wrapper, tsc build, build not working at all, or being incomplete?). I kinda doubt there is an issue like this (if there is, it would have to be in one of the libraries like I'd need to see a complete reproduction - exact steps, not "either that or that happened, or maybe that". Right now, I am not convinced we need to update the contributing guide. Your changes there could likely confuse people rather than help them. Reading this again and again, I actually think I know what is happening to you, it sounds the tsc build cache, which wasn't properly ignored some time ago (and we managed to include one |
I updated the documentation to not include the fix.
The project was tested and cloned after the fix you mentioned. Even attempting to run the normal steps would result with the same error either way. The normal steps with a fresh start would include:
You are correct however that it is tied to a local issue of mine as I tried many checks of the following:
I once again attempted today to do the normal steps of rebuilding the project. You are also correct that it has to do something with TypeScript's incremental build cache in my local environment; it has to do something with |
Summary
This PR adds detailed setup and build instructions to help contributors initialize the Crawlee project locally. It documents required dependencies, Yarn installation via Corepack, and guidance on using
yarn build
successfully.Key Changes
Documentation Additions:
yarn
commands.Important Notes:
Contributors: