question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amplify env pull fails in Windows after adding a function

See original GitHub issue

Describe the bug amplify env pull fails in Windows after adding a function using amplify function add

To Reproduce Steps to reproduce the behavior:

  1. Add a function using amplify function add
  2. Run npm install inside the src/ folder in the function
  3. Run amplify env pull or amplify init
  4. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kstro21commented, Mar 13, 2019

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.

1reaction
kfernandes29commented, Dec 10, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'amplify' is not recognized as an internal or external command
'amplify' is not recognized as an internal or external command # · Open the start search and type in env and then click...
Read more >
Configuring build settings - AWS Amplify Hosting
If your project doesn't have an amplify folder in your repository, Amplify ignores the value of the AMPLIFY_DIFF_BACKEND environment variable.
Read more >
Advanced workflows - Mocking and testing - AWS Amplify Docs
Learn how to quickly test and debug without pushing all changes in your Amplify project to the cloud. Use local mocking and testing...
Read more >
AWS amplify push/pull error - Stack Overflow
amplify configure amplify init amplify add api ... There was an error pulling the backend environment dev. The specified key does not ...
Read more >
Troubleshoot Dataflow errors - Google Cloud
This error occurs if your DoFn s are using values in the global namespace that are not available on the Dataflow worker. By...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found