Missing go.mod/go.sum lead to compilation failure #11

Closed
opened 2025-12-28 18:14:30 +00:00 by sami · 0 comments
Owner

Originally created by @roman-khimov on GitHub (Aug 23, 2023).

Originally assigned to: @AnnaShaleva on GitHub.

$ ./bin/neo-go contract compile -i ../neo-go-sc-wrkshp/2-storage/ -c ../neo-go-sc-wrkshp/2-storage/2-storage.yml -o w2s.nef -m w2s.manifest.json
error while trying to compile smart contract file: err: exit status 1: stderr: go: cannot find main module, but found .git/config in /home/rik/dev/neo-go-sc-wrkshp
        to create a module there, run:
        cd .. && go mod init

Or it some other way in some cases. Reverting to e11949bf5f (before 17aefd54c5) fixes the thing.

Originally created by @roman-khimov on GitHub (Aug 23, 2023). Originally assigned to: @AnnaShaleva on GitHub. ``` $ ./bin/neo-go contract compile -i ../neo-go-sc-wrkshp/2-storage/ -c ../neo-go-sc-wrkshp/2-storage/2-storage.yml -o w2s.nef -m w2s.manifest.json error while trying to compile smart contract file: err: exit status 1: stderr: go: cannot find main module, but found .git/config in /home/rik/dev/neo-go-sc-wrkshp to create a module there, run: cd .. && go mod init ``` Or it some other way in some cases. Reverting to e11949bf5f1dc1ce4e3b6551b6ae22032945c75d (before 17aefd54c559e624b2916164470e85d5d0e4bb96) fixes the thing.
sami 2025-12-28 18:14:30 +00:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go-sc-wrkshp#11
No description provided.