[SOLVED]Meteor upgrade to 1.5 error:Uncaught ReferenceError: Buffer is not defined

Hi,
In the following issue : https://github.com/meteor/meteor/issues/8645 there is comment how to find where Buffer constructor is used :
" you can easily drop a breakpoint on the error in your browser’s inspector, then refresh the page to hit the breakpoint and see via the call stack which package is trying to use Buffer".

Could any body help how to drop a breakpoint?

Regards,
Mirlan

Click to link right under error, smth like this modules.js?hash=282a9f8..b8702a
In my case it is helpers.js from meteor-node-stubs

Thank you. It is helper.js in my case too.
Tried to add global.Buffer = global.Buffer || require("buffer").Buffer;inside <app_path>/client/lib/init.js but without luck.

I know (-:
I tried too. And without luck too (-:

Solved. By puttin global.Buffer = global.Buffer || require("buffer").Buffer; into <app_path>/client/lib/init.js.
My bad , I tried by putting it in some different folder inside <app_path>/client/. But it is solved that it must be put exactly in
<app_path>/client/lib/init.js.

5 Likes

Same to me (-:
Very strange (-:

Adding an init.js file into my client folder with this exact line fixed my broken app. Thank you!