rollup-plugin-polyfill-node icon indicating copy to clipboard operation
rollup-plugin-polyfill-node copied to clipboard

Fix buffer-es6 polyfill: Cannot set properties of undefined (setting 'TYPED_ARRAY_SUPPORT')

Open YuAnWu0000 opened this issue 2 years ago • 2 comments

See [(https://github.com/parcel-bundler/parcel/issues/2833)] I've tried so many ways to prevent this error and finally found this approach to solve it.

YuAnWu0000 avatar Oct 19 '23 12:10 YuAnWu0000

can you move the code back to it's original location, so that the diff is more clear? Also, remove the nuxt settings config file change!

FredKSchott avatar Nov 20 '23 23:11 FredKSchott

Actually I only change the code order but not content. In my case, the order matters. Function Buffer() needs to be placed before Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : true;

Also, I remove the vscode nuxt setting. Thanks for reminding.

YuAnWu0000 avatar Dec 11 '23 10:12 YuAnWu0000