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 property 'prototype' of undefined #1547

Closed
lvhaohua opened this issue Jan 15, 2021 · 2 comments
Closed

Uncaught TypeError: Cannot read property 'prototype' of undefined #1547

lvhaohua opened this issue Jan 15, 2021 · 2 comments

Comments

@lvhaohua
Copy link

lvhaohua commented Jan 15, 2021

thanks for help

Describe the bug

when i add the fabric module and run dev again, this error is occurred.

Reproduction

https://github.com/lvhaohua/fabricjs-react-vite

System Info

  • vite version: 2.0.0-beta.12
  • Operating System: macOS 11.1 20C69
  • Node version: 14.4.0
  • Package manager (npm/yarn/pnpm) and version: yarn

Logs

some warning when 'yarn dev':

[plugin:vite:resolve] externalized node built-in "events" to empty module. (imported by: /Users/haohua/Canvas/canvas-hua/node_modules/jsdom/lib/jsdom/virtual-console.js)
[plugin:vite:resolve] externalized node built-in "events" to empty module. (imported by: /Users/haohua/Canvas/canvas-hua/node_modules/jsdom/lib/jsdom/virtual-console.js) (x2)
[plugin:vite:resolve] externalized node built-in "vm" to empty module. (imported by: /Users/haohua/Canvas/canvas-hua/node_modules/jsdom/lib/jsdom/browser/Window.js)
[plugin:vite:resolve] externalized node built-in "vm" to empty module. (imported by: /Users/haohua/Canvas/canvas-hua/node_modules/jsdom/lib/jsdom/browser/Window.js) (x2)
[plugin:vite:resolve] externalized node built-in "fs" to empty module. (imported by: /Users/haohua/Canvas/canvas-hua/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js)

@EthanHaid
Copy link

Could I get some more info about the fix here? I'm getting similar warnings importing Firepad, so is this the usual for cjs modules?

@yyx990803
Copy link
Member

It's the same problem. (fixed in beta.31)

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

No branches or pull requests

3 participants