Skip to content
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 properties of undefined (reading 'TYPED_ARRAY_SUPPORT') #22

Closed
nc opened this issue Nov 26, 2021 · 3 comments

Comments

@nc
Copy link

nc commented Nov 26, 2021

index.js:43 Uncaught TypeError: Cannot read properties of undefined (reading 'TYPED_ARRAY_SUPPORT')
    at Object.parcelRequire.../../node_modules/node-libs-browser/node_modules/buffer/index.js.base64-js (index.js:43)
    at newRequire (src.f10117fe.js:47)
    at localRequire (src.f10117fe.js:53)
    at Object.parcelRequire.../../node_modules/lodash/lodash.js.buffer (index.js:1790)
    at newRequire (src.f10117fe.js:47)
    at localRequire (src.f10117fe.js:53)
    at Object.parcelRequire.src/micromerge.ts.uuid (micromerge.ts:3)
    at newRequire (src.f10117fe.js:47)
    at localRequire (src.f10117fe.js:53)
    at Object.parcelRequire.src/bridge.ts../micromerge (bridge.ts:5)
parcelRequire.../../node_modules/node-libs-browser/node_modules/buffer/index.js.base64-js @ index.js:43
newRequire @ src.f10117fe.js:47
localRequire @ src.f10117fe.js:53
parcelRequire.../../node_modules/lodash/lodash.js.buffer @ index.js:1790
newRequire @ src.f10117fe.js:47
localRequire @ src.f10117fe.js:53
parcelRequire.src/micromerge.ts.uuid @ micromerge.ts:3
newRequire @ src.f10117fe.js:47
localRequire @ src.f10117fe.js:53
parcelRequire.src/bridge.ts../micromerge @ bridge.ts:5
newRequire @ src.f10117fe.js:47
localRequire @ src.f10117fe.js:53
parcelRequire.src/index.ts../bridge @ index.ts:1
newRequire @ src.f10117fe.js:47
(anonymous) @ src.f10117fe.js:81
(anonymous) @ src.f10117fe.js:120

Seeing this error after cloning and starting the latest.

@joelewis
Copy link

I have temporarily worked around this problem. It looks like a misunderstanding between parcel and the script tags with type module.

Just remove the type="module" attribute from the script tag in index.html and it should work fine.

I'll probably submit a PR and hope for the best.

joelewis added a commit to joelewis/peritext that referenced this issue Nov 27, 2021
Parcel has some [misunderstandings between script tags declared as es module](parcel-bundler/parcel#1401) and it's cascading into the build as console errors inkandswitch#22  inkandswitch#21 

Removing the attribute sorts this out. until they fix it in Parcel.
@geoffreylitt
Copy link
Collaborator

@nc thanks for the bug report. could you try pulling latest main branch and see if that fixes it?

@geoffreylitt
Copy link
Collaborator

Closing this because I think it's fixed now,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants