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

Does not transpile on Windows #960

Closed
wants to merge 1 commit into from
Closed

Does not transpile on Windows #960

wants to merge 1 commit into from

Conversation

pkarnia
Copy link

@pkarnia pkarnia commented Aug 24, 2023

Summary

Noticed that npm run transpile silently fails on Windows 11 machine with output:

> int_adyen_SFRA@23.2.0 transpile C:\...\adyen-salesforce-commerce-cloud-23.2.0
> babel ./src/cartridges  -d ./cartridges --copy-files --no-copy-ignored --extensions '.js,.test.js,.snap'

Successfully compiled 0 files with Babel (4803ms).

Transpile works fine on *nix machines, only our developer on Windows was having issues during the build process.
Running with clean install of

  • Windows 11 Pro 22H2
  • node v14.21.3
  • npm 6.14.18
  • Unmodified Adyen cartridge 23.2.0

Apparently this is a known issue with babel on Windows, see : babel/babel#9803

Removing the single quotes or switching to escaped double quotes \" fixes the transpile issue on Windows.

> int_adyen_SFRA@23.2.0 transpile C:\...\adyen-salesforce-commerce-cloud-23.2.0
> babel ./src/cartridges  -d ./cartridges --copy-files --no-copy-ignored --extensions .js,.test.js,.snap

[BABEL] Note: The code generator has deoptimised the styling of C:\...\adyen-salesforce-commerce-cloud-23.2.0\src\cartridges\adyen_controllers_changes\app_storefront_core_changes\cartridge\static\default\js\app.js as it exceeds the max of 500KB.
Successfully compiled 126 files with Babel (20006ms).

Fixed issue:
Might be related to #946 since those errors are thrown by npm run compile:js if transpile fails

fix for babel on Windows dislike of quoted file ext. arguments
@sonarcloud
Copy link

sonarcloud bot commented Aug 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@amihajlovski
Copy link
Contributor

Hey @pkarnia

Thanks for creating this PR!
I tested it and it works on macOS as well.
I will close this PR because its against main, but will recreate it to our dev environment and will be included in next release!

Kind Regards
Aleksandar
Adyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants