You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running gatsby-dev works fine in CMD, but not in PowerShell.
Steps to reproduce
I have followed these instructions up until where it says to run gatsby-dev.
Expected result
gatsby-dev should run.
Actual result
PS D:\git\personal-blog> gatsby-dev
At C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1:5 char:13
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+ ~
Unexpected token ')' in expression or statement.
At C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1:8 char:3
+ if [ -x "$basedir/pwsh" ]; then
+ ~
Missing '(' after 'if' in if statement.
At C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1:8 char:5
+ if [ -x "$basedir/pwsh" ]; then
+ ~
Missing type name after '['.
At C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1:9 char:20
+ ... edir/pwsh" "$basedir/../Data/global/node_modules/.bin/gatsby-dev.ps1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '"$basedir/../Data/global/node_modules/.bin/gatsby-dev.ps1"' in expression or statement.
At C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1:9 char:79
+ ... wsh" "$basedir/../Data/global/node_modules/.bin/gatsby-dev.ps1" "$@"
+ ~~~~
Unexpected token '"$@"' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken
Looking inside the file in question (C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1) it does not appear to be a valid PowerShell script, instead it's an sh script:
#!/bin/sh
basedir=$(dirname "$(echo "$0"| sed -e 's,\\,/,g')")
case `uname`in*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x"$basedir/pwsh" ]; then
"$basedir/pwsh""$basedir/../Data/global/node_modules/.bin/gatsby-dev.ps1""$@"
ret=$?else
pwsh "$basedir/../Data/global/node_modules/.bin/gatsby-dev.ps1""$@"
ret=$?
fi
exit$ret
The text was updated successfully, but these errors were encountered:
Description
Running
gatsby-dev
works fine in CMD, but not in PowerShell.Steps to reproduce
I have followed these instructions up until where it says to run
gatsby-dev
.Expected result
gatsby-dev
should run.Actual result
Environment
Extra information
Looking inside the file in question (
C:\Users\josh\AppData\Local\Yarn\bin\gatsby-dev.ps1
) it does not appear to be a valid PowerShell script, instead it's an sh script:The text was updated successfully, but these errors were encountered: