Cyfrin/foundry-full-course-f23

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

Jayfromthe13th opened this issue · 7 comments

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

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.

It Might be an environment Problem.

You can follow these steps... A Link

scoolj commented

Hi, try to use

forge init 

dont use " forge --init "

Hi, try to use

forge init 

dont use " forge --init "

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

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

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

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