Cyfrin / foundry-full-course-cu

GNU General Public License v3.0
3.41k stars 831 forks source link

Trying to create a new project in foundry. Error 'init' is not a valid subcommand #502

Closed Jayfromthe13th closed 1 year ago

Jayfromthe13th commented 1 year ago

Lesson

Lesson 1

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

https://youtu.be/umepbfKp5rI?t=25276

Operating System

macOS (Intel)

Describe the bug

Hi everyone, I have ran forge init and I'm getting the following error message. Can't figure out how to get over this issue and would love help. Thanks.

jordanbishop@Jordans-MacBook-Pro foundry-simple-storage-f23 % forge init                    
──────────────
✖ 'init' is not a valid subcommand. See 'forge --help'
──────────────
ℹ Did you mean this?
  - forge join
  - forge asset
  - forge config
  - forge help
  - forge install
  - forge logs
  - forge ls
  - forge ps
  - forge start
  - forge stop
  - forge tx
  - forge use
  - forge web

I also ran forge which and got the following.

jordanbishop@Jordans-MacBook-Pro foundry-simple-storage-f23 % which forge
/usr/local/bin/forge
ChefAharoni commented 1 year ago

This is really weird. I've checked to see if they have changed the command, but it still shows in their docs.

Doesn't look like this is the problem, but have you tried that on a clear directory? i.e. no files at all in the folder.

Also try to run foundryup in install the latest version of foundry.

theirrationalone commented 1 year ago

It Might be an environment Problem.

You can follow these steps... A Link

scoolj commented 1 year ago

Hi, try to use

forge init 

dont use " forge --init "

SquilliamX commented 1 year ago

Hi, try to use

forge init 

dont use " forge --init "

I think he did use forge init and not forge --init

vizay315 commented 1 year ago

Lesson

Lesson 1

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

https://youtu.be/umepbfKp5rI?t=25276

Operating System

macOS (Intel)

Describe the bug

Hi everyone, I have ran forge init and I'm getting the following error message. Can't figure out how to get over this issue and would love help. Thanks.

jordanbishop@Jordans-MacBook-Pro foundry-simple-storage-f23 % forge init                    
──────────────
✖ 'init' is not a valid subcommand. See 'forge --help'
──────────────
ℹ Did you mean this?
  - forge join
  - forge asset
  - forge config
  - forge help
  - forge install
  - forge logs
  - forge ls
  - forge ps
  - forge start
  - forge stop
  - forge tx
  - forge use
  - forge web

I also ran forge which and got the following.

jordanbishop@Jordans-MacBook-Pro foundry-simple-storage-f23 % which forge
/usr/local/bin/forge

first run this command : forge install (which installs the latest version) then : forge init

vizay315 commented 1 year ago

first run this command : forge install (which installs the latest version) then : forge init

Jayfromthe13th commented 1 year ago

Thank you, everyone. 👏🏽 It was an environment issue of some sort. I had to delete and reinstall everything, and then it worked.