Cyfrin / 3-passwordstore-audit

16 stars 47 forks source link

make deploy gives Error 6275; make install fails except with removing folders in lib(and the running make install) #10

Open S23Web3 opened 6 months ago

S23Web3 commented 6 months ago

make deploy fails because of an issue with the library folders, make install does not work (git submodule exited with code 128) Removing the folders in the lib and then running make install and then make deploy solves the issue While getting the repo it adds the folders:

When running make install in the terminal, the issue is that you get error code: fatal: 'lib/<repo-name>' already exists and is not a valid git repo Error: git submodule exited with code 128 make: *** [Makefile:21: install] Error 1 removing the folders in the lib folder and then running make install solves the issue and makes it run fine.

S23Web3 commented 6 months ago

The reason why I had to run make install was because make deploy failed with the error below

3-passwordstore-audit$ make deploy
[⠊] Compiling...
[⠒] Unable to resolve imports:
      "forge-std/Script.sol" in "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit/script/DeployPasswordStore.s.sol"
      "forge-std/Test.sol" in "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit/test/PasswordStore.t.sol"
with remappings:
[⠢] Unable to resolve imports:
      "forge-std/Script.sol" in "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit/script/DeployPasswordStore.s.sol"
      "forge-std/Test.sol" in "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit/test/PasswordStore.t.sol"
with remappings:
[⠆] Unable to resolve imports:
      "forge-std/Script.sol" in "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit/script/DeployPasswordStore.s.sol"
      "forge-std/Test.sol" in "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit/test/PasswordStore.t.sol"
with remappings:

[⠰] Compiling 3 files with 0.8.18
[⠔] Solc 0.8.18 finished in 8.99ms
Error: 
Compiler run failed:
Error (6275): Source "forge-std/Script.sol" not found: File not found. Searched the following locations: "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit".
 --> script/DeployPasswordStore.s.sol:4:1:
  |
4 | import {Script, console2} from "forge-std/Script.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error (6275): Source "forge-std/Test.sol" not found: File not found. Searched the following locations: "/~/security-and-auditing/3-passwordstore-audit/3-passwordstore-audit".
 --> test/PasswordStore.t.sol:4:1:
  |
4 | import {Test, console} from "forge-std/Test.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

make: *** [Makefile:45: deploy] Error 1

//I removed my un@hn with ~