Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter onesignal add problems "Expected to find project root in current working directory."

When I want to add onesignal to flutter, I get the following error. How can I solve it?

PROBLEM PHOTO

like image 506
can Avatar asked Nov 15 '25 09:11

can


2 Answers

You'll get this error if you try run a command from outside the root of your flutter project folder. Simply type pwd in your project terminal, and the command will output the full path of your working directory. In VSCode, you can quickly access the project root folder terminal by right clicking the folder then "open in integrated terminal".

like image 196
Sharon Avatar answered Nov 17 '25 21:11

Sharon


You will get this error if you type 'flutter pub get <>' instead of 'flutter pub add <>' in the terminal

like image 38
MattPrash Avatar answered Nov 17 '25 23:11

MattPrash