oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.22k stars 2.69k forks source link

TypeError: Cannot set properties of undefined (setting 'wasm') in webpack-dev-server #2075

Closed dungtran5 closed 1 year ago

dungtran5 commented 1 year ago

What version of Bun is running?

0.5.6

What platform is your computer?

Darwin 22.1.0 x86_64 i386

What steps can reproduce the bug?

I think this issue is just a Node's API error that bun not support yet, but as I didn't find any issue related to this, I open a new issue here

Pre-condition:

Step

  1. Install dependencies with bun install
  2. Start local project using yarn start

package.json content

{
  "private": true,
  "scripts": {
    "start": "cross-env APP_ENV=dev UMI_ENV=dev WDS_SOCKET_PORT=3001 umi dev",
    "build": "cross-env NODE_ENV=development APP_ENV=dev UMI_ENV=dev umi build ",
    "build:dev": "cross-env NODE_ENV=development APP_ENV=dev UMI_ENV=dev umi build ",
    "build:prod": "cross-env NODE_ENV=production APP_ENV=prod UMI_ENV=prod umi build",
    "build:staging": "cross-env NODE_ENV=production APP_ENV=dev UMI_ENV=dev umi build",
    "test": "umi test"
  },
  "dependencies": {
    "@ant-design/icons": "^4.7.0",
    "antd": "^4.16.2",
    "classnames": "^2.3.1",
    "cross-env": "^7.0.3",
    "dva": "^2.6.0-beta.6",
    "formik": "^2.2.9",
    "js-cookie": "^3.0.1",
    "json-bigint": "^1.0.0",
    "lodash": "^4.17.21",
    "lodash.get": "^4.4.2",
    "lodash.throttle": "^4.1.1",
    "lodash.uniq": "^4.5.0",
    "moment": "^2.29.1",
    "prop-types": "^15.7.2",
    "qiankun": "2.7.3",
    "qs": "^6.10.2",
    "react": "^16.8.6",
    "react-document-title": "^2.0.3",
    "react-dom": "^16.8.6",
    "react-query": "^3.39.1",
    "react-router-breadcrumbs-hoc": "^4.1.0",
    "react-use": "^17.3.2",
    "serve": "^13.0.2",
    "styled-components": "^5.3.3",
    "unstated-next": "^1.1.0",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "babel-eslint": "^9.0.0",
    "eslint": "^8.2.0",
    "eslint-config-airbnb": "19.0.4",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-react": "^7.28.0",
    "eslint-plugin-react-hooks": "^4.3.0",
    "react-test-renderer": "^16.7.0",
    "umi": "^2.7.7",
    "umi-plugin-react": "^1.8.4"
  },
  "engines": {
    "node": ">=8.0.0"
  }
}

What is the expected behavior?

Run without error as install with npm/yarn

What do you see instead?

[umi-plugin-dll] File list is equal, don't generate the dll file.
✖  error     TypeError: Cannot set properties of undefined (setting 'wasm') 
    at new Server (/Users/[path]/node_modules/webpack-dev-server/lib/Server.js:160:36)
    at Object.dev [as default] (/Users/[path]/node_modules/af-webpack/lib/dev.js:251:12)
    at /Users//Users/[path]/node_modules/umi-build-dev/lib/plugins/commands/dev/index.js:169:46
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Additional information

No response

dungtran5 commented 1 year ago

Close as seem bun has a lot of things to care instead of these issues. Hope stable v1 release soon for test it again