Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win10] Error when deploying from a non-C: drive #1120

Closed
guevaraf opened this issue Jun 1, 2020 · 6 comments
Closed

[Win10] Error when deploying from a non-C: drive #1120

guevaraf opened this issue Jun 1, 2020 · 6 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. sam

Comments

@guevaraf
Copy link

guevaraf commented Jun 1, 2020

Describe the bug
When running the command pattern "AWS: Deploy SAM Application" it fails on step Building function '[function name]' because of a script pointing to C: mount while the project is on a D: folder. We get error 'ValueError: path is on mount 'C:', start on mount 'd:''.

To Reproduce

  1. Create a folder in D: or any drive other than C:
  2. Create a workspace there
  3. Create SAM application using command 'AWS: Create new SAM application'
  4. Detect SAM CLI using command 'AWS: Detect SAM CLI'
  5. Run locally the application to check it compiles and runs successfully
  6. Try to deploy the application using command 'AWS: Deploy SAM application'

Expected behavior
SAM Application is successfully deployed.

Screenshots

  • Please see the full console dump in the Additional context section -

Computer (please complete the following information):

  • Windows Version: Windows 10 Pro v. 1903 x64
  • Visual Studio Version: 1.45.1
  • AWS Toolkit for Visual Studio Version: 1.10.0

Additional context
Full console dump:

Starting SAM Application deployment...
Building SAM Application...
Error with child process: Building function 'CronLFunction'
,Running NodejsNpmBuilder:NpmPack
,Running NodejsNpmBuilder:CopyNpmrc
,Running NodejsNpmBuilder:CopySource
,Running NodejsNpmBuilder:NpmInstall
,Running NodejsNpmBuilder:CleanUpNpmrc
,Traceback (most recent call last):
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 193, in _run_module_as_main
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 85, in _run_code
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\__main__.py", line 12, in <module>
    cli(prog_name="sam")
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\click\core.py", line 1259, 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 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\lib\telemetry\metrics.py", line 96, in wrapped
    raise exception  # pylint: disable=raising-bad-type
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\lib\telemetry\metrics.py", line 62, in wrapped
    return_value = func(*args, **kwargs)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\commands\build\command.py", line 129, in cli
    mode,
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\commands\build\command.py", line 195, in do_cli
    modified_template = builder.update_template(ctx.template_dict, ctx.original_template_path, artifacts)
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\lib\build\app_builder.py", line 161, in update_template
    artifact_relative_path = os.path.relpath(built_artifacts[logical_id], original_dir)
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\ntpath.py", line 562, in relpath
ValueError: path is on mount 'C:', start on mount 'd:'
An error occurred while deploying a SAM Application. Check the logs for more information by running the "View AWS Toolkit Logs" command from the Command Palette.
@awschristou awschristou transferred this issue from aws/aws-toolkit-visual-studio Jun 1, 2020
@awschristou
Copy link
Contributor

I've transferred this issue from the Visual Studio Toolkit repo to the VS Code Toolkit repo

@awschristou awschristou added the bug We can reproduce the issue and confirmed it is a bug. label Jun 1, 2020
@bryceitoc9
Copy link
Contributor

Looks like this might be a SAM CLI issue: aws/aws-sam-cli#1336 ; this was resolved and shipped last August. Could you try updating your SAM CLI, and if that doesn't work, what version of the SAM CLI are you using?

@justinmk3 justinmk3 added the sam label Jun 1, 2020
@guevaraf
Copy link
Author

guevaraf commented Jun 2, 2020

@awschristou thank you for the transfer, it seems it is aws-sam-cli related
@bryceitoc9 my version is the latest I believe: 0.52.0 . Also, the bug fix you pointed out seems to be the same type of error on a different part of the code. I will try to transfer to aws-sam-cli or to open it there.

@guevaraf
Copy link
Author

guevaraf commented Jun 2, 2020

@awschristou can you transfer to aws-sam-cli ? Thank you!

@awschristou
Copy link
Contributor

Hi @guevaraf I'm unable to transfer the issue into the aws-sam-cli repo. Would you be able to open a new issue up directly over there?

@guevaraf
Copy link
Author

guevaraf commented Jun 2, 2020

done, I'm closing this issue then.

@guevaraf guevaraf closed this as completed Jun 2, 2020
justinmk3 pushed a commit that referenced this issue Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. sam
Projects
None yet
Development

No branches or pull requests

4 participants