command not found: flow - command

I followed the Flow installation guide for npm & babel and when I get to the second stage where you flow init I keep getting the error message zsh command not found: flow. I installed flow into my project (a branch of my Gatsby blog) for testing/debugging purposes. It is not installed globally, which is what the Flow docs state is the best practice:
Flow works best when installed per-project with explicit versioning rather than globally.
I have been having a similar issue with Lume that returns zsh command not found: lume
If I enter echo $PATH
The colon delimited list should have user/local/.deno/bin:$PATH but it is not there. If I add it by running:
export PATH="/Users/yourUserName/.deno/bin:$PATH"
Than I am able to run lume commands. However, when I try to run lume commands the next day I have to go through the whole process once more as the error crops up again...
My question here today is regarding the Flow error and getting it sorted. I only mention the Lume error because it makes me fairly certain something is messed up in $Path or my Zsh config. I am just not sure what. The only caveat to that hunch though is that Deno is a global install, whereas Flow is installed directly into my project...
So, maybe the two errors while the same syntax are totally separate?
Thank you in advance for any guidance/suggestions. Cheers!

I came across this video from 2017 no less and the host had issues with flow not working within the project and so he installed it globally. I gave it a shot and the flow error zsh command not found: flow has been resolved...

Related

esp-idf build fails with "fatal error: esp_wifi.h: No such file or directory"

I am a student who has gotten a part time job embedded system programming. I am given a program the company uses, and asked to understand it. This is a working program. Therefore, the project can be built and flashed on ESP32 by the developers with no problem. So, the code and CMake files should have no issues. However, I cannot build the program either with VSCode extension nor with idf.py. In fact, I cannot build esp-idf examples from the official website, either.
Note: I am new to StackOverflow as well as to ESP32, so sorry if I made any mistakes here. If this post is problematic in any way, please inform me.
The error message from the terminal is shown here
I was initially using VSCode on Windows 10 (Windows is not activated). At first, ESP extension was completely failing to start the building process because it could not locate the tools. I was getting "could not be located" errors for all the tools. Below is a list of what I did in this setting:
I had v5.0.0 for esp-idf downloaded from Espressif server. I deleted it and tried v4.3.3 and then I tried to download from Github server. I downloaded the requirements for idf.py scripting environment and completed the settings for it as described by the Espressif's documentation.
I manually set the environment variables for IDF_PATH and PATH for both the user and for the system.
After 2, the initial error was gone. Unfortunately, I had a new error which indicated that ".elf" file for the project output could not be found. I do not exactly recall the error but if it is integral to the problem's solution I can try to replicate this issue.
I tried to delete and reinstall VSCode. I tried running VSCode with admin authority.
I tried changing the IDF_TOOLS_PATH in the VSCode esp-idf extension configurations from ".espressif" to "esp\esp-idf".
At this point, I moved to try to build the project on Ubuntu 22.04.1 LTS:
In Ubuntu, I got the fatal error: esp_event.h: No such file or directory error.
It does not seem to be a common issue and I could not find much about it online.
I followed the Linux setup steps in the documentation. It said that only step 1 (Downloading the prerequisites) was necessary for the VSCode extension.
I decided to try the "master branch" from esp-idf configurations as well. After I downloaded the master branch, the error changed to the current version: 'fatal error: esp_wifi.h: No such file or directory'
I also tried the idf.py in Ubuntu but I got the same error.
Both in Ubuntu and in Windows, the Doctor Command returns nothing. It does not even open the terminal or any window. I am not sure what it should return but some online discussions were asking about its return so I wanted to note it here.
Edit: When I tried the examples on Ubuntu, they actually build just fine. Doctor Command also works with examples.
However, the main code has still issues. Initially, I assumed I made some mistakes with esp-idf configurations. But, perhaps that was not the case.
I had the same problem and ended up editing my project's CMakeLists.txt. When I added "esp_wifi" to the "REQUIRES" list, it worked for me:
idf_component_register(
SRCS "main.c"
INCLUDE_DIRS res
EMBED_FILES res/settings.html
REQUIRES esp_wifi
)

Strange source command when start Julia REPL

I am a bit fresh to Julia (and stack overflow), so it might be a dummy question. I am using VS code in ubuntu 18.04.
Every time I start Julia REPL from VS code (Ctrl+shift+P, then "Julia: Start REPL"), the Julia REPL starts with a strange command "source /home/$user_name/bin/activate" and then an error (of course source is not defined in Julia) :
ERROR: UndefVarError: source not defined
Stacktrace:
[1] top-level scope
# REPL[1]:1
This problem was shown a couple of weeks ago but it does not affect my code at least for now. I have tried to search the problem but haven't found any similar questions. Any hints on what's going on? Many thanks!
Edit:
I think I might have used Conda somewhere.
Do "which Julia", I got:
/home/$user_name/julia-1.7.2/bin//julia
There is no "/home/$user_name/.julia/config/startup.jl" file, all the directories under "/home/$user_name/.julia/" are as follow:
artifacts compiled dev logs prefs scratchspaces
clones conda environments packages registries
Then I found a "startup.jl" file under "$JULIA_INSTALL_FOLDER\etc\julia\startup.jl", with following content (seems like not helping on my problem).
# This file should contain site-specific commands to be executed on Julia startup;
# Users may store their own personal commands in `~/.julia/config/startup.jl`.
Solved by following #SundarR's suggestion.
The problem was caused by the VSCode-Python extension installed.
Please see the comment above for the details and thanks again!

Netbeans php-cs-fixer end up with error "Files that were not fixed due to errors reported during linting after fixing:"

I am using php-cs-fixer for code formatting in Netbeans 8.2. When I try to format one file, it shows the error
Files that were not fixed due to errors reported during linting after fixing:
I searched for the fix in many websites, but couldn't get this fixed. Is there any way to fix this? I tried with both php-cs-fixer 1 and php-cs-fixer 2.
The error message means that PHP CS Fixer loaded some files from drive, apply changes on them, and then realised that files are not valid anymore (invalid PHP syntax) after those changes, thus it decided to not save it. That's one of the safety mechanism of PHP CS Fixer to not break your project.
This means that you have found an issue in PHP CS Fixer itself.
Please, verify you are using newest release, maybe the bug was already fixed!
If not, please consider to expose your configuration file (if any) and content of files you got listed at https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/new !
There is also an option to see what happen in progress.
$ ./vendor/bin/php-cs-fixer fix src/ErrorFile.php -vvv
The --verbose option will show the applied rules. When using the txt format it will also display progress notifications.
NOTE: if there is an error like "errors reported during linting after fixing", you can use this to be even more verbose for debugging purpose
-v: verbose
-vv: very verbose
-vvv: debug

What are the steps to package and release VS Code?

I am trying to figure out how to package an unchanged fork of VS Code.
My first steps were to follow the electron application distubution documentation, which has not been successful. I also found this post, where another user had the same question. However, the vscode-win32 gulp task seems to have been replaced by x64 and ia32 versions, and when I try running these tasks they generate an out-vscode folder as opposed to a full electron project.
This led me to believe that I can use this new out folder (as well as node modules, packages.json, etc.) with the electron release being used by VS Code to mimic the resources/app folder from the installed version of VS Code in Program Files, however when I try running electron.exe using this method I get:
The factory method of "vs/code/electron-main/main" has thrown an exception TypeError: Path must be a string. Received undefined
In short, I have been struggling with this for a couple of days, and I am out of ideas. If anyone has packaged the project and can offer a suggestion for how to do so, I would really appreciate it.
SOLVED
The issue seemed to be due to being branched off of master as opposed to release. I'd assume there are changes in main that aren't accounted for in the gulp task.
For anyone confused by my post, the expected behavior for a successful build is for a folder named VSCode-win32-x64 to be generated in the directory where your vscode clone is located.

Why can I not compile TypeScript anymore?

I'm doing some web development and I did a commit & sync via GitHub's Mac GUI, then I installed some Mac updates that required a restart (I don't know what the updates were). When I opened my project in PHPStorm again, I found this error when I tried compiling my TypeScript:
/usr/local/bin/tsc
env: node: No such file or directory
I know the compilation was working before. My web application had no issues. This question deals specifically with me being able to do this yesterday, with no changes to the FileWatcher configuration.
I have my TypeScript Compiler in usr/local/bin/tsc (which I have checked as a valid path to a typescript compiler alias). When I click on the alias, It opens a terminal window and runs typescript, so I know it's there. PHPStorm also complains if I try to change the file path, saying I must pick a valid executable.
I modified my Environment Variables on the advice of Dan Clark's site but that hasn't changed anything. I don't have the reputation to upload a photo of my File Watchers Dialog.
Does anyone know why I am getting this error, and how it can be fixed? I mention GitHub because that's the last thing I did before things stopped working: a commit & sync, then a restart to install some Mac updates.
Both which node and which tsc point in the right direction. Just tsc also works.
My solution was to use the directory of the actual TypeScript compiler at /usr/local/lib/node_modules/typescript/bin/tsc
instead of
/usr/local/bin/tsc, which is the alias.
That lets me compile using the FileWatcher.
As for why this happened, it's still a mystery to me.