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.

TypeError: util.isNode is not a function after upgrading to 3.3.1

See original GitHub issue

I’m getting TypeError: util.isNode is not a function here https://github.com/aws/aws-sdk-js/blob/54f8555bd94d33a1754a44a35286f1d9e31c28a3/lib/dynamodb/types.js#L26 when

import DynamoDBSet from 'aws-sdk/lib/dynamodb/set';

new DynamoDBSet([1, 2]);
    at isBinary (.../node_modules/aws-sdk/lib/dynamodb/types.js:26:12)
    at typeOf (.../node_modules/aws-sdk/lib/dynamodb/types.js:6:36)
    at Set.detectType (.../node_modules/aws-sdk/lib/dynamodb/set.js:35:37)
    at Set.initialize (.../node_modules/aws-sdk/lib/dynamodb/set.js:28:10)
    at new Set (.../node_modules/aws-sdk/lib/dynamodb/set.js:22:10)

I noticed it actually started happening after updating a dev dependency of jest-dynalite that introduced this new dependency @aws/dynamodb-auto-marshaller@^0.7.1

Downgrading jest-dynalite (consequently removes the dependency) it works as expected.

see https://github.com/aws/aws-sdk-js/issues/3601

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fresholliecommented, Jan 13, 2021

FYI. The reason this caused an issue after upgrading is because your code was relying on aws-sdk being imported first, which jest-dynalite was originally doing (setting up the module cache is such).

From v3.3.1 jest-dynalite dynamically imports aws-sdk, which means it has less side effects on your code and thus highlighted this issue.

0reactions
onhatecommented, Jan 13, 2021

ok @freshollie according to your comment on the original issue on aws-sdk repository it makes sense that it’s not directly related to jest-dynalite

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get "TypeError: object is not a function" running this ...
And I have npm install 'd csv, accounting util and restler in the home directory, and the script is there too. This has...
Read more >
Changelog - Cypress Documentation
When providing an inline viteConfig inside of cypress.config , any vite.config.js file is not automatically merged. See migration guide. Addresses #24133.
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >
Firebase JavaScript SDK Release Notes - Google
Upgraded TypeScript in each individual package to 4.7.4. ... rejection in isSupported() when the environment does not support IndexedDB's open() method.
Read more >
typeerror: (intermediate value) is not iterable - You.com | The AI
Since a function unlike an Array, Object among others is not . ... An "intermediate value" is just a value that's produced inside...
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