I tried running my expo project for the first time on a new M1 Pro mac. I obtained the following error logs. For context, I am using the fish shell. What is wrong? Are ps and grep obtained through some package(s)?
bananas#MacBook-Pro ~/E/myproject [254]> expo start
WARNING: expo-cli has not yet been tested against Node.js v17.0.1.
If you encounter any issues, please report them to https://github.com/expo/expo-cli/issues
expo-cli supports following Node.js versions:
* >=12.13.0 <13.0.0 (Maintenance LTS)
* >=14.0.0 <15.0.0 (Active LTS)
* >=15.0.0 <17.0.0 (Current Release)
Starting project at /Users/williama/Experiments/prpool
Developer tools running on http://localhost:19002
Opening developer tools in the browser...
/bin/sh: ps: command not found
/bin/sh: grep: command not found
/bin/sh: ps: command not found
/bin/sh: grep: command not found
/bin/sh: ps: command not found
/bin/sh: grep: command not found
/bin/sh: ps: command not found
/bin/sh: grep: command not found
/bin/sh: ps: command not found
/bin/sh: grep: command not found
/bin/sh: ps: command not found
/bin/sh: grep: command not found
Error: spawn open ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:475:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I did not have my PATH set up properly.
Before, I had
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin"
export PATH=$ANDROID_HOME/platform-tools
I realized that the last line was overwriting my PATH variable and throwing away everything set on the first line, since the I was not using the $PATH reference (notice the dollar sign) on the second definition.
export PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin"
Related
I have an exe file which executing some commands in docker container (ubuntu) that should make a build and run application. In some step I need to make a copy of dist file and command looks like this
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v //f/bigaboo/repos/ledger://f/bigaboo/repos/ledger --workdir=//f/bigaboo/repos/ledger bbcli_executor bash -c "cp ./public/index.php.dist ./public/index.php"
When I just run this command in the terminal all works well but if it's under exe control I have this output
./public/index.php.dist: -c: line 1: unexpected EOF while looking for matching `"'
./public/index.php.dist: -c: line 2: syntax error: unexpected end of file
2022/10/31 22:14:42 Failed to create index.php`. Error -> exit status 2
Looks like script don't recognize strings under exe.
I've tried to wrap cp in '',`` and \x22 but I've got the same result but with different symbols also I've tried to change encoding also without success :(
So i'm following the github article to test my SSH connection by copy pasting the command found in this article in my terminal but it gives me this message:
zsh: command not found: $
Also im on MacOS if that helps
article:
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection
You should not include the $ in your copy-paste.
The $ is commonly used to indicate that the following code will be a terminal command. But $ is not part of the command itself.
I am following this guide to install pip: https://www.tensorflow.org/install/pip
When I run this command: . ./venv/bin/activate.fish
I get the following error:
-bash: ./venv/bin/activate.fish: line 4: syntax error near unexpected token -d'
-bash: ./venv/bin/activate.fish: line 4:function deactivate -d "Exit virtualenv and return to normal shell environment"'
Please assist.
thanks
The script activate.fish is intended for fish shell. You're running bash so it's a wrong script for bash. With bash use activate:
. ./venv/bin/activate
The command should be
$ source ./venv/bin/activate
if you are using bash in a Linux machine.
I'm trying to run a small bash script inside my CodeBuild process as per the AWS documentation and this.
deploy.sh can be found in the src/ directory:
#!/bin/bash
pwd=$PWD
for dir in */ ; do
target="$pwd/${dir%/}"
cd "$target"
npm install
sls deploy && sls s3deploy
done
buildspec file:
version: 0.2
phases:
install:
runtime-versions:
nodejs: 10
commands:
- cd backend/functions/src
- npm install serverless
build:
commands:
- ls
- ./deploy.sh
after the ls command above in the logs, I can see that deploy.sh is there in the current directory.
Error:
/codebuild/output/tmp/script.sh: 4: /codebuild/output/tmp/script.sh: ./deploy.sh: not found
I've also tried using the command /bin/bash deploy.sh but this results in another error:
deploy.sh: line 2: $'\r': command not found
deploy.sh: line 4: $'\r': command not found
deploy.sh: line 7: $'\r': command not found
deploy.sh: line 8: syntax error near unexpected token `$'do\r''
deploy.sh: line 8: `for dir in */ ; do
(First written as a comment, it solved the problem)
The files were made in Windows.
Change CRLF to LF and the \r is gone.
The first answer by Walter A worked for me, this is what i did .
Opened the file in VS Code
At bottom left corner for Select End Of Line Sequence it showed CRLF
clicked on CRLF and selected LF
Uploaded the file to github and it started working.
I'm trying to install Meteor on my Mac, following the instructions on their site (https://www.meteor.com/install)
curl https://install.meteor.com/ | sh
However, when I run the command, I get the following error:
sh: line 1: syntax error near unexpected token `newline'
sh: line 1: `<!DOCTYPE html>'
Pretty new to Terminal, so pointers appreciated.