semaphore-protocol / semaphore

A zero-knowledge protocol for anonymous interactions.
https://semaphore.pse.dev
MIT License
925 stars 207 forks source link

Error when running `yarn build:subgraph` #876

Closed vplasencia closed 9 hours ago

vplasencia commented 1 month ago

Description

Every time I switch branch in the project and run yarn and then yarn build:subgraph, I get this error:

node:internal/process/esm_loader:46
      internalBinding('errors').triggerUncaughtException(
                                ^

Error: Cannot find package '<project-path>/semaphore/apps/subgraph/node_modules/@semaphore-protocol/utils/package.json' imported from <project-path>/semaphore/apps/subgraph/scripts/generate-subgraph.js
Did you mean to import <project-path>/semaphore/packages/utils/dist/index.cjs?

If I remove the node_modules folder inside the subgraph project, and run yarn build:subgraph again, it works well.

0xshikhar commented 1 month ago

Hey @vplasencia , would like to work on this task. Any additional context would be appreciated. Thanks!

vplasencia commented 1 month ago

Hey @0xshikhar do you want me to assign you this issue?

If I follow these steps I see the error:

1- Clone the semaphore repo

2- Run yarn

3- Run yarn build

4- Run yarn build (or yarn build:subgraph)

Then I see the error.

Let me know if you see it too?

If I remove the node_modules folder inside the subgraph app and I run yarn build (or yarn build:subgraph) again, it works fine.

0xshikhar commented 1 month ago

Hi @vplasencia, yes I can regenerate this issue by following the above process. I can work on this. Thanks!

vplasencia commented 1 month ago

Hey @0xshikhar! I just assigned the issue to you. Feel free to ask any questions you may have.

0xshikhar commented 4 weeks ago

Hey @vplasencia , let me know your views about the pull request

vplasencia commented 4 weeks ago

Hey @0xshikhar! Thank you very much for creating the PR. I will review it asap.