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.

Directly importing a type leads to exception

See original GitHub issue

If I try to do this

import { Table } from "@pulumi/aws/dynamodb";
new Table(...);

rather than this

import * as aws from "@pulumi/aws";
new aws.dynamodb.Table(...);

I receive the following error

Running program '...' failed with an unhandled exception:
    TypeError: Class extends value undefined is not a constructor or null
        at Object.<anonymous> (.../node_modules/@pulumi/cloudwatch/eventRuleMixins.ts:70:55)
        at Module._compile (module.js:573:30)
        at Object.Module._extensions..js (module.js:584:10)
        at Module.load (module.js:507:32)
        at tryModuleLoad (module.js:470:12)
        at Function.Module._load (module.js:462:3)
        at Module.require (module.js:517:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (.../node_modules/@pulumi/cloudwatch/cloudwatchMixins.ts:16:1)
        at Module._compile (module.js:573:30)

I assume this is an import ordering issue and might not be something we can fix. If it is fixable, however, that would be nice, as the former import style is preferable sometimes.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:11
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jwarwick-delficommented, Oct 19, 2022

+1, still an issue on pulumi v3.43.1 with “@pulumi/aws”: “5.17.0”

2reactions
andrewdibiasio6commented, Mar 25, 2022

Any updates on this? I am also having this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Catching local exception type raised by imported module
The solution is to not have the same value ( CustomException ) imported via two different paths (local name and from b.py )....
Read more >
Built-in Exceptions — Python 3.11.1 documentation
User code can create subclasses that inherit from an exception type. ... meant to be directly inherited by user-defined classes (for that, use...
Read more >
Imports failing with an error stating 'Insert failed. See inner ...
When trying to import data into an ICM table, the import is failing with an error stating 'Insert failed. See inner exception for...
Read more >
exceptions – Built-in error classes - Python Module of the Week
TypeErrors are caused by combining the wrong type of objects, or calling a function with the wrong type of object. result = ('tuple',)...
Read more >
Python Exception Handling: ImportError and ... - Airbrake Blog
The ImportError is raised when an import statement has trouble successfully importing the specified module. Typically, such a problem is due ...
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