I ran into an issue after I did flutter pub add flutter_tts. when building, it immediately started giving a weird CMake build error (which I don’t understand), making the build fail. It looks similar to https://github.com/flutter/flutter/issues/95898, but that’s in a different package. I’m hoping that someone can provide some clues as to what is going on here and how I might be able to fix it. (so I can continue to work on my app). here’s the error that I’m encountering:
Launching lib\main.dart on Windows in debug mode...
NUGET.EXE not found.
CMake Error at flutter/ephemeral/.plugin_symlinks/flutter_tts/windows/CMakeLists.txt:9 (message):
Please install this executable, and run CMake again.
Please install this executable, and run CMake again.
Error: Unable to generate build files
Exited (1).
I tried to install nuget.exe and add the folder of the location of nuget.exe to PATH, but that didn’t fix the issue.
Solution
What worked for me:
- download nuget.exe from https://www.nuget.org/downloads
- put nuget.exe in C:/Windows/System32
- restart VSCode
- run
flutter clean - run
flutter pub get - try to start a new debug session. it should work now.
Answered By — Rea Mart
Answer Checked By — Clifford M. (FixIt Volunteer)
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0
