Bug: [WinError 3] The system cannot find the path specified #7053
Labels
area/build
sam build command
blocked/more-info-needed
More info is needed from the requester. If no response in 14 days, it will become stale.
platform/windows
Description:
When using sam build I got the following error:
Error: [WinError 3] The system cannot find the path specified: '.aws-sam\build\TradesGateway\CreateSuperUser\node_modules\@AWS-SDK\credential-provider-node\node_modules\@AWS-SDK\client-sso-oidc\dist-es\auth\httpAuthExtensionConfiguration.js
full error
``` Error: [WinError 3] The system cannot find the path specified: '.aws-sam\\build\\TradesGateway\\CreateSuperUser\\node_modules\\@AWS-SDK\\credential-provider-node\\node_modules\\@AWS-SDK\\client-sso-oidc\\dist-es\\auth\\httpAuthExtensionConfiguration.js' Traceback: File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\cli\cli_config_file.py", line 347, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\decorators.py", line 92, in new_func return ctx.invoke(f, obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 185, in wrapped raise exception # pylint: disable=raising-bad-type ^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 150, in wrapped return_value = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\utils\version_checker.py", line 43, in wrapped actual_result = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\cli\main.py", line 95, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\command.py", line 175, in cli do_cli( File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\command.py", line 240, in do_cli with BuildContext( File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\build_context.py", line 185, in __enter__ self.set_up() File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\build_context.py", line 216, in set_up self._build_dir = self._setup_build_dir(self._build_dir, self._clean) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\build_context.py", line 467, in _setup_build_dir shutil.rmtree(build_dir) File "shutil.py", line 787, in rmtree File "shutil.py", line 629, in _rmtree_unsafe File "shutil.py", line 629, in _rmtree_unsafe File "shutil.py", line 629, in _rmtree_unsafe [Previous line repeated 7 more times] File "shutil.py", line 634, in _rmtree_unsafe File "shutil.py", line 632, in _rmtree_unsafe ```I control click on the path and the file does exist.
I have run this code recently and the resources successfully built and deployed, I'm not too sure what has changed.
Steps to reproduce:
I have an sam template with nested AWS::Serverless::Applications
One is an API gateway that contains a lambda function
The CodeUri src/auth-services/
Has a package.json file that contains the following
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.116.0Debug Flag Results
I apologies if I have not correctly laid out this issue as this is the first issue I have submitted
The text was updated successfully, but these errors were encountered: