Directly importing a type leads to exception
See original GitHub issueIf 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:
- Created 4 years ago
- Reactions:11
- Comments:9 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1, still an issue on pulumi v3.43.1 with “@pulumi/aws”: “5.17.0”
Any updates on this? I am also having this issue.