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
I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
yarn
If applicable, what version of Node.js are you using?
15.12.0
Amplify CLI Version
4.46.0
What operating system are you using?
Windows
Amplify Categories
Not applicable
Amplify Commands
Not applicable
Describe the bug
When setting up the dev environment on Windows, during setup-dev-win script, specifically when it runs the link-win script, if your Yarn installation is in a separate drive than the amplify-cli project, it will create an incorrect link for the amplify-dev command.
In my case, my Yarn directory is C:\Users\Pawan\AppData\Local\Yarn\bin\ and the amplify-cli project is at somewhere in the D drive: D:\...\amplify-cli\packages\amplify-cli\bin\amplify
This issue seems to be caused by this issue in the npm/cmd-shim package which amplify-cli/scripts/link-bin.js is using for setting up the linking for amplify-dev command on Windows.
Expected behavior
amplify-dev should correctly run.
Reproduction steps
Place amplify-cli project in a different drive
Run yarn run setup-dev-win from the amplify-cli project root
Run amplify-dev in a sample project
GraphQL schema(s)
No response
Log output
No response
Screenshot
The text was updated successfully, but these errors were encountered:
Description of changes
Using the pnpm/cmd-shim library instead of npm/cmd-shim would fix the cross-drive linking issue for amplify-dev on Windows. A PR on pnpm/cmd-shim fixed the issue whereas it's still not fixed on npm/cmd-shim.
This PR adds the pnpm/cmd-shim library and updates the imports in scripts/link-bin.js
Issue #, if available
fixes#6950
Description of how you validated changes
I checked the file at C:\Users\Pawan\AppData\Local\Yarn\bin\amplify-dev.ps1 for proper linking and verified that the amplify-dev command is properly running in sample projects.
Before opening, please confirm:
How did you install the Amplify CLI?
yarn
If applicable, what version of Node.js are you using?
15.12.0
Amplify CLI Version
4.46.0
What operating system are you using?
Windows
Amplify Categories
Not applicable
Amplify Commands
Not applicable
Describe the bug
When setting up the dev environment on Windows, during
setup-dev-win
script, specifically when it runs thelink-win
script, if your Yarn installation is in a separate drive than the amplify-cli project, it will create an incorrect link for theamplify-dev
command.In my case, my Yarn directory is
C:\Users\Pawan\AppData\Local\Yarn\bin\
and the amplify-cli project is at somewhere in the D drive:D:\...\amplify-cli\packages\amplify-cli\bin\amplify
This issue seems to be caused by this issue in the
npm/cmd-shim
package whichamplify-cli/scripts/link-bin.js
is using for setting up the linking for amplify-dev command on Windows.Expected behavior
amplify-dev
should correctly run.Reproduction steps
yarn run setup-dev-win
from the amplify-cli project rootamplify-dev
in a sample projectGraphQL schema(s)
No response
Log output
No response
Screenshot

The text was updated successfully, but these errors were encountered: