question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`npm:aws-cdk init` throws TypeError (windows only)

See original GitHub issue
deno run -A npm:aws-cdk init --language typescript

Applying project template app for typescript
TypeError [ERR_INVALID_ARG_TYPE]" argument must be of type number. Received undefined
    at __node_internal_ (https://deno.land/std@0.165.0/node/internal/validators.mjs:112:15)
    at parseFileMode (https://deno.land/std@0.165.0/node/internal/validators.mjs:49:3)
    at Object.chmod (https://deno.land/std@0.165.0/node/_fs/_fs_chmod.ts:8:12)
    at Object.chmod (file:///C:/Users/GJZwiers/AppData/Local/deno/npm/registry.npmjs.org/node_modules/graceful-fs/polyfills.js:252:19)l-fs/polyfills.js:252:19)                                                                                     /lib/copy/copy.js:131:13)
    at setDestMode (file:///C:/Users/GJZwiers/AppData/Local/deno/npm/registry.npmjs.org/node_modules/fs-extray.js:98:12/lib/copy/copy.js:131:13)                                                                                     fs.js:186:16
    at file:///C:/Users/GJZwiers/AppData/Local/deno/npm/registry.npmjs.org/node_modules/fs-extra/lib/copy/copy.js:98:12
    at file:///C:/Users/GJZwiers/AppData/Local/deno/npm/registry.npmjs.org/node_modules/graceful-fs/graceful-fs.js:186:16
    at https://deno.land/std@0.165.0/node/_fs/_fs_common.ts:230:31
    at https://deno.land/std@0.165.0/node/_fs/_fs_copy.ts:30:49
deno --version

deno 1.28.1 (release, x86_64-pc-windows-msvc)
v8 10.9.194.1
typescript 4.8.3

Edit: Only happens on Windows

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cjihrigcommented, Nov 22, 2022

Is there a way to make my local deno binary/cargo build work with my local copy of std, so I can test some changes?

Yep! Here is what I use:

DENO_NODE_COMPAT_URL='file:///path/to/your/std/' /path/to/cli/deno run -A --unstable your_script.js

0reactions
cjihrigcommented, Nov 23, 2022

Thanks for taking a look. Interestingly, Node does not pass a default value to here either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm:aws-cdk init throws TypeError (windows only) #2916
The issue seems to be that the mode parameter passed to chmod function is null and no default value def is set in...
Read more >
Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK.
Read more >
aws-cdk-lib - npm
AWS Cloud Development Kit Library. The AWS CDK construct library provides APIs to define your CDK application and add CDK constructs to the...
Read more >
aws amplify npm
Aws Amplify NpmHow to Add Authentication to a Vue App Using AWS Amplify. ... The complete code for this post is on this...
Read more >
TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found