TypeError: Cannot read property 'TYPED_ARRAY_SUPPORT' of undefined #803
See original GitHub issue🐛 bug report
When I import oidc-client and write “new UserManager({…})” in a parcel bundled project, I get this issue: “Uncaught TypeError: Cannot read property ‘TYPED_ARRAY_SUPPORT’ of undefined” I tried it without parcel and it worked. So the issue should be caused by parcel.
🎛 Configuration (.babelrc, package.json, cli command)
{
"name": "my-project",
"version": "0.1.0",
"license": "UNLICENSED",
"author": "Me",
"scripts": {
"start": "parcel src/index.html --no-cache --port 8080",
"start:build": "http-server dist/ -o",
"build": "parcel build src/index.html --no-cache"
},
"dependencies": {
"lit-element": "^2.1.0",
"oidc-client": "^1.7.0"
},
"devDependencies": {
"http-server": "^0.11.1",
"parcel-bundler": "^1.12.3",
"parcel-plugin-webcomponents": "^1.2.0"
},
"browserslist": [
"last 2 chrome version",
"last 2 firefox version",
"last 2 edge version",
"last 2 safari version",
"not dead"
]
}
🤔 Expected Behavior
oidc-client should just work.
😯 Current Behavior

💁 Possible Solution
No idea
🔦 Context
I just tried to use oidc-client in a parcel bundled project. Everything worked under webpack.
💻 Code Sample
import { UserManager } from 'oidc-client'
const userManager = new UserManager({})
🌍 Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 1.12.3 |
| Node | 11.11.0 |
| npm | 6.7.0 |
| Operating System | Windows 10 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Babel - Cannot read property 'TYPED_ARRAY_SUPPORT' of ...
After a week worth of investigation (thanks to @MinusFour for setting me on the right path), It appears that it was a Webpack...
Read more >TypeError: Cannot read property 'data' of undefined
catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/ ...
Read more >mqtt.js源码1 - CSDN博客
(function (f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f() } else if (typeof define ...
Read more >replaceShortcuts - Drafts Directory
TemplateTagParser = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a ...
Read more >Viewing online file analysis results for 'background.js'
No similar samples ... Contains ability to read software policies ... Opens the MountPointManager (often used to detect additional infection ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please don’t use
<script type="module">with parcel. There is no reason to do so as Parcel already compiles es6 modules away.The buffer polyfill for browsers contains this code
If you run the parcel script in a
type="module"script (which is unsupported), Parcel can’t get the global object usingthisbecause that’s forbidden in this context. Figuring out the global object is actually not trivial: https://github.com/tc39/proposal-globalDoesn’t work for me… (#1401)