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

yarn generate-clients -m throws TypeError [ERR_INVALID_ARG_TYPE] #1312

Closed
trivikr opened this issue Jun 30, 2020 · 1 comment · Fixed by #1313
Closed

yarn generate-clients -m throws TypeError [ERR_INVALID_ARG_TYPE] #1312

trivikr opened this issue Jun 30, 2020 · 1 comment · Fixed by #1313

Comments

@trivikr
Copy link
Member

trivikr commented Jun 30, 2020

Describe the bug
yarn generate-clients -m throws TypeError [ERR_INVALID_ARG_TYPE]

SDK version number
master

Details of the browser/Node.js version

$ node -v
v14.2.0

To Reproduce (observed behavior)

  • Create a temporary directory
    $ mkdir ~/Downloads/temp
  • Copy a model to that directory
    $ cp codegen/sdk-codegen/aws-models/s3.2006-03-01.json ~/Downloads/temp
  • Run yarn generate-clients on the temporary directory
    $ yarn generate-clients -m ~/Downloads/temp 

Error thrown:

yarn run v1.22.4
$ node ./scripts/generate-clients -m /home/trivikr/Downloads/temp
preparing models from /home/trivikr/Downloads/temp...
copying model s3.2006-03-01.json...
TypeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object
    at copyFileSync (fs.js:1905:10)
    at generateClients (/local/home/trivikr/workspace/aws-sdk-js-v3/scripts/generate-clients/code-gen.js:23:7)
    at /local/home/trivikr/workspace/aws-sdk-js-v3/scripts/generate-clients/index.js:36:11
    at Object.<anonymous> (/local/home/trivikr/workspace/aws-sdk-js-v3/scripts/generate-clients/index.js:57:3)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'ERR_INVALID_ARG_TYPE'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected behavior
yarn generate-clients -m succeeds

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant