-
Notifications
You must be signed in to change notification settings - Fork 40
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
Uncaught TypeError: Cannot read property 'prototype' of undefined #31
Comments
considering that the line is |
hmmm, if you think i am not using it, how can i exclude it then? |
that is a more general rollup question, there might be a module replacer plugin or something that might rewrite readable-stream calls to just regular stream calls |
ugh, that's probably new / out of my league. hints or examples how to replace this would be very welcome |
@calvinmetcalf ok, what exactly would you replace with that alias plugin?
|
|
@calvinmetcalf thanks but i am afraid, i am seeing this error with that change:
for reference, this is the whole config: export default {
entry: 'src/index.js',
moduleName: uppercamelcase(moduleName),
sourceMap: 'inline',
plugins: [
replace({'process.env.NODE_ENV': JSON.stringify('development')}),
progress(),
stylusCssModules({output: false}),
json({preferConst: true}),
alias({
'readable-stream': 'stream'
}),
commonjs(),
buble(),
builtins(),
resolve({jsnext: true, browser: true}),
globals(),
filesize({showGzippedSize: false})
],
targets: [{
dest: packageInfo.main,
format: 'iife'
}]
} not sure if the alias plugin should be moved further down? |
Apparently it's because For the time being I fork the packages I need and I replace |
have switched to webpack i am afraid ... |
I'm seeing this error too. I'm also not using this package explicitly. My offending error is at:
I'm using
|
I just ended up finding related discussion in nodejs/readable-stream#237 So it seems I'm supposed to not use If I do use this to resolve the rollup issue with |
it might interact weirdly, with other polyfills, but based on your config, you only have one for next tick |
The rest of my polyfills are in the dev dependencies, since they are only brought in wheb bundling with rollUp.
…On 15 May 2018 00:28:55 GMT+10:00, Calvin Metcalf ***@***.***> wrote:
it might interact weirdly, with other polyfills, but based on your
config, you only have one for next tick
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#31 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
so this includes polyfills as well, so it could case some weird issues if
you try to include both
…On Mon, May 14, 2018 at 2:36 PM Roger Qiu ***@***.***> wrote:
The rest of my polyfills are in the dev dependencies, since they are only
brought in wheb bundling with rollUp.
On 15 May 2018 00:28:55 GMT+10:00, Calvin Metcalf <
***@***.***> wrote:
>it might interact weirdly, with other polyfills, but based on your
>config, you only have one for next tick
>
>--
>You are receiving this because you commented.
>Reply to this email directly or view it on GitHub:
>
#31 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABE4n1iVX1cegyEmax03DLqYUKfJxkUyks5tyZaAgaJpZM4OENl_>
.
|
I ended converting to just using your polyfills @calvinmetcalf and switching from readable-stream to stream. I hope everything works. |
Happens when
util.inherits(Duplex, Readable);
is executed, see screenshot:To reproduce, just
git clone https://github.com/binarykitchen/videomail-client/tree/feature/rollupjs
and runyarn examples
. Then you see that in the console.The text was updated successfully, but these errors were encountered: