Skip to content

fix(cta-js): rename arguments to args due to strict mode - #478

Merged
amrbashir merged 2 commits into
tauri-apps:devfrom
birkskyum:rename-arguments-to-args-due-to-strict-mode
Aug 26, 2023
Merged

fix(cta-js): rename arguments to args due to strict mode#478
amrbashir merged 2 commits into
tauri-apps:devfrom
birkskyum:rename-arguments-to-args-due-to-strict-mode

Conversation

@birkskyum

@birkskyum birkskyum commented Aug 23, 2023

Copy link
Copy Markdown
Contributor

I stumbled upon this error:

error: Declarations with the name arguments cannot be used with esm due to strict mode

const [bin, script, ...arguments] = process.argv;
                       ^
/private/tmp/create-tauri-app@latest--bunx/node_modules/create-tauri-app/create-tauri-app.js:10:24 249
error: "create-tauri-app" exited with code 1 (SIGHUP)

Context here:
oven-sh/bun#3237 (comment)

The solution is to rename arguments to args or anything else really. This can be verified by adding "use strict"; to the top of the file.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@amrbashir amrbashir changed the title Rename arguments to args due to strict mode fix(cta-js): rename arguments to args due to strict mode Aug 26, 2023
@amrbashir
amrbashir merged commit 194d569 into tauri-apps:dev Aug 26, 2023
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