amplify env pull fails in Windows after adding a function
See original GitHub issueDescribe the bug amplify env pull fails in Windows after adding a function using amplify function add
To Reproduce Steps to reproduce the behavior:
- Add a function using
amplify function add
- Run
npm install
inside the src/ folder in the function - Run
amplify env pull
oramplify init
-
There was an error initializing your environment. init failed { Error: EPERM: operation not permitted, symlink ‘…\mime\cli.js’ -> ‘app\amplify.temp#current-cloud-backend\function\myfunction\src\node_modules.bin\mime’ errno: -4048, code: ‘EPERM’, syscall: ‘symlink’, path: ‘…\mime\cli.js’, dest: ‘\app\amplify\.temp\#current-cloud-backend\function\myfunction\src\node_modules\.bin\mime’ }
Expected behavior Be able to pull, checkout or init an existing environment after adding a function.
Desktop (please complete the following information):
- OS: Windows 10
- amplify-cli 1.1.7
Additional context Same error using windows cmd or a bash for Windows.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top GitHub Comments
The problem is due to Windows permissions to create symlinks, we need to run the cmd as administrator, then it works. Closing
Thanks, @yuth, for the time.
@lebull Glad it helped! That new admin UI + the new CLI has been nothing but headaches this week. It set me back quite a bit. I’m not sure how I got it all back to normal, but after 48 hours of frustration…it’s good again.