-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build v0.28.1 #547
Comments
Seems like v0.26.0 and v0.27.0 works, but only if I add It still fails on v0.28.0 and v0.28.1 with |
I can reproduce this, and have no earthly idea why our install test doesn't catch it. |
Actually my output is entirely different:
|
ok figured it out! It's the version of TypeScript that's probably creating the problem. When I hard code to @marcusnielsen what version of TypeScript are you using? |
@JustinBeckwith I'm able to reproduce this consistently with a local install of |
waaaaaaaaat |
I think it might be the result of using some of the defaults that {
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "./build",
"rootDir": "./",
"strict": true,
"types": ["node"],
"esModuleInterop": true
}
} |
My report applies to typescript version |
typescript Same error as @marcusnielsen, in import * as Duplexify from 'duplexify';
export class StreamProxy extends Duplexify {...} Edit: removing this is not ideal, causes errors importing other modules. {
- "esModuleInterop": true,
+ "esModuleInterop": false,
}
Seems Edit Try this instead of removing
|
I can confirm that it builds with I haven't run any code yet to try it out, but hopefully this unblocks us from using the latest version. Well done with the speedy work here! 🥇 From my point of view, you can close the issue unless you want to keep it open to solve the root cause. |
Looks like GAX had the same issue but has since solved it by removing the dependency on the duplexify types. I have a combined JS/TS project and rely on esModuleInterop for a number of other dependencies. Unfortunately using CommonJS imports doesn't solve the problem for me (I was already using it for pub sub). |
@MattGson do you have the same issue with typescript v3.4.1? We were able to solve it by upgrading typescript. You might want to delete your package-lock.json and rm -rf node_modules just to be safe if you try. After doing so we have managed to use the normal import syntax in all of our projects without any issues. EDIT: I just realized that it might not have been related to typescript v3.4.1, but rather the wiping of the lock file. |
Hey, that seems to have done the trick. Thanks very much. I tried deleting package-lock.json and reinstalling with no luck. Then tried updating TS, still no luck. Then I deleted node modules and package-lock.json and reinstalled which seems to have fixed it. |
@MattGson @marcusnielsen I'm glad you've found a solution to this issue 🎉 @marcusnielsen please feel free to reopen if you continue to have any issues 👍, closing for now. |
@google-cloud/pubsub
version: 0.28.1Steps to reproduce
In a new project:
npm install typescript @google-cloud/pubsub
src/index.ts
with content:npx tsc --init
npx tsc
and the console output should give you a typescript error:I tried to downgrade the pubsub version a bit but it didn't solve it.
The text was updated successfully, but these errors were encountered: