Polyfills required after start, Can't resolve 'fs', 'crypto' and 'os' when starting the project
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
I've just installed the interface project i've run the following:
- yarn
- yarn postinstall
- yarn graphql
- yarn contracts
- yarn ajv
- yarn i18n
When I got to yarn start, I'm receiving the following errors:
ERROR in ./node_modules/@lingui/message-utils/dist/generateMessageId.mjs 1:0-28
Module not found: Error: Can't resolve 'crypto' in 'C:\uniswap\interface\node_modules@lingui\message-utils\dist'
Module not found: Error: Can't resolve 'os' in 'C:\uniswap\interface\node_modules\cosmiconfig\dist'
Module not found: Error: Can't resolve 'fs' in 'C:\uniswap\interface\node_modules\cosmiconfig\dist'
Module not found: Error: Can't resolve 'module' in 'C:\uniswap\interface\node_modules\import-fresh\node_modules\resolve-from'
Note no modifications have been made to the projects.
I'm running Node: v18.17.1 on windows.
I would assume the project should just work out of the box no? Any insight on how to fix this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the setup with the listed yarn commands and yarn start on Node 18. Inspect the module-resolution errors in @lingui/message-utils, cosmiconfig, and import-fresh/node_modules/resolve-from, especially the missing crypto, os, fs, and module dependencies. Done means the project starts without these unresolved-module errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100