web-dev-qa-db-ja.com

req.handle.writevは関数ではありません

Dockerコンテナー内のプロジェクトにReact、React-Redux、Webpackを使用していますが、このエラーが発生し続けます

internal/stream_base_commons.js:59 var err = req.handle.writev(req、chunks、allBuffers); ^

TypeError:req.handle.writevは、socket._writev(net.js:767:8)のSocket._writeGeneric(net.js:758:5)のwritevGeneric(internal/stream_base_commons.js:59:24)の関数ではありませんdoWrite(_stream_writable.js:408:12)at clearBuffer(_stream_writable.js:517:5)at Socket.Writable.uncork(_stream_writable.js:314:7)at connectionCorkNT(_http_outgoing.js:646:8)at process ._tickCallback(internal/process/next_tick.js:63:19)

以下は私のバージョンです

  1. NODE_VERSION 8.9
  2. YARN_VERSION 1.7.0
  3. OS Docker Linux/Raspbian Lite
  4. Webpack/Webpack-Ddv-Server(最新)
  5. React/Redux(最新)

私のpackage.json

{
  ....
  "dependencies": {
    "object-assign": "*",
    "raf": "*",
    "react": "*",
    "react-dev-utils": "*",
    "react-dom": "*",
    "react-facebook-login": "*",
    "react-helmet": "*",
    "react-loadable": "*",
    "react-slick": "*",
    "react-router": "*",
    "react-router-dom": "*",
    "react-redux":"*",
    "redux":"*",
    "redux-thunk":"*",
    "slick-carousel":"*",
    "font-awesome":"*"
  },
  "devDependencies": {
    "postcss-flexbugs-fixes": "3.2.0",
    "postcss-loader": "2.0.8",
    "promise": "8.0.1",
    "autoprefixer": "7.1.6",
    "babel-core": "6.26.0",
    "babel-eslint": "7.2.3",
    "babel-jest": "20.0.3",
    "babel-loader": "7.1.2",
    "babel-preset-react-app": "^3.1.1",
    "babel-runtime": "6.26.0",
    "case-sensitive-paths-webpack-plugin": "2.1.1",
    "node-sass-chokidar": "*",
    "npm-run-all": "*",
    "sass-loader": "*",
    "sw-precache-webpack-plugin": "0.11.4",
    "resolve": "1.6.0",
    "style-loader": "0.19.0",
    "url-loader": "0.6.2",
    "webpack": "*",
    "webpack-dev-server": "*",
    "webpack-manifest-plugin": "*",
    "whatwg-fetch": "2.0.3",
    "chalk": "1.1.3",
    "css-loader": "0.28.7",
    "dotenv": "4.0.0",
    "dotenv-expand": "4.2.0",
    "eslint": "4.10.0",
    "eslint-config-react-app": "^2.1.0",
    "eslint-loader": "1.9.0",
    "eslint-plugin-flowtype": "2.39.1",
    "eslint-plugin-import": "2.8.0",
    "eslint-plugin-jsx-a11y": "5.1.1",
    "eslint-plugin-react": "7.4.0",
    "extract-text-webpack-plugin": "3.0.2",
    "file-loader": "*",
    "fs-extra": "*",
    "html-webpack-plugin": "*",
    "jest": "20.0.4"
  },
  "scripts": {
    "start-js": "node scripts/start.js",
    "start": "npm-run-all -p watch-css start-js",
    "build-js": "node scripts/build.js",
    "build": "npm-run-all build-css build-js",
    "build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
    "watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
    "test": "node scripts/test.js --env=jsdom",
    "postinstall": "npm run start"
  },
  "jest": {
    "collectCoverageFrom": [
      "src/**/*.{js,jsx,mjs}"
    ],
    "setupFiles": [
      "<rootDir>/config/polyfills.js"
    ],
    "testMatch": [
      "<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
      "<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
    ],
    "testEnvironment": "node",
    "testURL": "http://localhost",
    "transform": {
      "^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
      "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
      "^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
    },
    "transformIgnorePatterns": [
      "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
    ],
    "moduleNameMapper": {
      "^react-native$": "react-native-web"
    },
    "moduleFileExtensions": [
      "web.js",
      "js",
      "json",
      "web.jsx",
      "jsx",
      "node",
      "mjs"
    ]
  },
  "babel": {
    "presets": [
      "react-app"
    ]
  },
  "eslintConfig": {
    "extends": "react-app"
  }
}

この問題を持つ他の誰か?頻繁には発生しませんが、開発プロセスを妨げます

17
Kendall

この問題を持つ他の誰か?はい...この問題は私と一緒に多く起こっており、私を緊張させていますが、通常、それが起こったとき、私はコンピュータを再起動して消えました!

今のところ、私は解決策を探しすぎたので、コンピューターを再起動することが解決策だと思いますが、結果はゼロになりました。

2
Ammar Ismaeel

NodeJSバージョン10.13.0上のWindows 10 x64でこのエラーが発生していました。 NodeJSバージョン10.13.0を削除し、バージョン8.11.3をインストールし、マシンを再起動しただけです。