"TypeError: Cannot read property 'Reader' of undefined" after upgrading to 2.4.0
See original GitHub issueEnvironment details
- OS: Windows 10 (my machine) and Ubuntu 18.04 (GitHub Action runner)
- Node.js version: 12.14
- npm version: 6.14.5
@google-cloud/pubsub
version: 2.4.0- Typescript version: 3.9.7
Steps to reproduce
- Import anything from
@google-cloud/pubsub@2.4.0
(e.g.Message
), and use it - Run the code
- The following error will occur:
TypeError: Cannot read property 'Reader' of undefined
at ../node_modules/@google-cloud/pubsub/build/protos/protos.js:28:29
at ../node_modules/@google-cloud/pubsub/build/protos/protos.js:22:26
at Object.<anonymous> (../node_modules/@google-cloud/pubsub/build/protos/protos.js:24:3)
at Object.<anonymous> (../node_modules/@google-cloud/pubsub/src/index.ts:156:1)
Minimal reproduction:
import { Message } from '@google-cloud/pubsub';
describe('Test', () => {
it('should work', () => {
expect(Message).toBeDefined();
});
});
I had a look through the diff between 2.3.0
and 2.4.0
, but couldn’t see anything suspect. I did try downgrading my Typescript version to 3.8.3
to match what this library was compiled with, but the same error occurs
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
TypeError: Cannot read properties of undefined (reading 'on')
after update my project electron (19) will not start. i got the error. Uncaught TypeError: Cannot read properties of undefined (reading ...
Read more >cannot read properties of undefined (reading 'filter') angular
To solve the "Cannot read properties of undefined" error, make sure to insert the JS script tag at the bottom of the body....
Read more >JS error "Cannot read property 'timestamp'" at checkout after ...
I upgraded Magento 2.3.3 to 2.4.2-p1 and at the checkout it presents this error and just keeps loading the checkout. Uncaught TypeError: ...
Read more >Uncaught TypeError: Cannot read property of undefined In
This error occurs in Chrome Browser when you read a property or call a method on an undefined object . There are a...
Read more >Changelog - Cypress Documentation
When a chromium based browser tab or process crashes, Cypress will no ... where Cypress would crash with TypeError: Cannot read property 'length'...
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 FreeTop 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
Top GitHub Comments
Yup. Deleting
package-lock.json
andnode_modules/
fixes it (in case you want a work-around)@npomfret
2.3.0
works fine for me