首页 > 解决方案 > 什么是 npm make?

问题描述

我正在学习 Reactjs,遇到了这个GitHub plangrid/react-file-viewer repo。当我尝试按照说明进行操作时,我看到了这一点:

启动演示应用
make start 将启动由 webpack-dev-server 提供的演示应用

make start在 VsCode 终端中运行会报错:

PS L:\temp\react-file-viewer-master\react-file-viewer-master> make start make :术语“make”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。纠正并重试。在行:1 字符:1

  • 开始
  •   + CategoryInfo          : ObjectNotFound: (make:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

请解释这是如何工作的以及如何启动这个 Reactjs 应用程序?

这是对我来说非常先进的 package.json,但我喜欢通过阅读代码来学习

{
  "name": "react-file-viewer",
  "version": "1.2.1",
  "description": "Extendable file viewer for web",
  "main": "dist/index.js",
  "module": "dist/index.js",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/plangrid/react-file-viewer.git"
  },
  "scripts": {
    "dev": "webpack -d --watch",
    "build": "webpack -p --progress",
    "start": "node ./scripts/start.js",
    "lint": "node_modules/.bin/eslint ./src/**/*.jsx",
    "test": "node_modules/.bin/jest --env=jsdom --watch",
    "jest": "node_modules/.bin/jest --env=jsdom",
    "tag-and-publish": "node ./scripts/publish.js"
  },
  "author": "PlanGrid <opensource@plangrid.com>",
  "contributors": [
    {
      "name": "Alexei Schiopu",
      "email": "alexxschiopu@gmail.com",
      "url": "http://schiopu.me"
    },
    {
      "name": "Aaron Norby",
      "email": "aaron.norby@gmail.com"
    },
    {
      "name": "Viktoriya Savkina",
      "email": "viktoriya.savkina@gmail.com"
    }
  ],
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/plangrid/react-file-viewer/issues"
  },
  "homepage": "https://github.com/plangrid/react-file-viewer#readme",
  "devDependencies": {
    "autoprefixer": "^7.1.0",
    "babel-core": "^6.24.1",
    "babel-jest": "^20.0.3",
    "babel-loader": "^7.0.0",
    "babel-plugin-transform-class-properties": "^6.19.0",
    "babel-plugin-transform-es2015-classes": "^6.18.0",
    "babel-plugin-transform-es2015-object-super": "^6.6.5",
    "babel-plugin-transform-runtime": "6.23.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "6.5.0",
    "babel-runtime": "^6.20.0",
    "chalk": "^1.1.3",
    "css-loader": "^0.28.1",
    "enzyme": "^3.8.0",
    "enzyme-adapter-react-16": "^1.7.1",
    "eslint": "^3.19.0",
    "eslint-config-airbnb": "^15.0.1",
    "eslint-import-resolver-webpack": "^0.8.1",
    "eslint-loader": "^1.7.1",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jsx-a11y": "^5.0.3",
    "eslint-plugin-react": "^7.0.1",
    "file-loader": "^0.11.1",
    "html-webpack-plugin": "^2.28.0",
    "inquirer": "^3.0.6",
    "jest": "^23.6.0",
    "node-sass": "^4.5.3",
    "postcss-loader": "^2.0.5",
    "react": "^16.6.3",
    "react-dom": "^16.6.3",
    "react-test-renderer": "^16.6.3",
    "sass-loader": "^6.0.5",
    "style-loader": "^0.17.0",
    "url-loader": "^0.5.8",
    "webpack": "^2.5.1",
    "webpack-dev-server": "^2.4.5"
  },
  "dependencies": {
    "comma-separated-values": "^3.6.4",
    "mammoth": "1.3.6",
    "pdfjs-dist": "1.8.357",
    "prop-types": "^15.5.10",
    "react-data-grid": "^5.0.5",
    "react-visibility-sensor": "^5.0.2",
    "three": "0.85.2",
    "xlsx": "^0.10.1"
  },
  "peerDependencies": {
    "react": "^16.6.3",
    "react-dom": "^16.6.3"
  },
  "jest": {
    "testPathIgnorePatterns": [
      "<rootDir>[/\\\\](build|node_modules|scripts|example_files)[/\\\\]"
    ],
    "testEnvironment": "node",
    "transform": {
      "^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
      "^.+\\.(css|scss)$": "<rootDir>/config/jest/cssTransform.js",
      "^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
    },
    "transformIgnorePatterns": [
      "[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
    ],
    "moduleDirectories": [
      "src",
      "node_modules"
    ],
    "setupTestFrameworkScriptFile": "<rootDir>/tests/setupTests.js"
  },
  "eslintConfig": {
    "extends": "airbnb",
    "plugins": [
      "import"
    ],
    "settings": {
      "import/resolver": {
        "webpack": "webpack.config.js"
      }
    }
  }
}

更新 我可以使用启动它npm start并使用 Launch.json 在 VsCode 中开始调试。

但得到这样的错误: 在此处输入图像描述

log.js:24 [HMR] Waiting for update signal from WDS...
Columns.js:27 Uncaught Error: Module parse failed: Unexpected token (64:41)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|     const headerRowsCount = enableFilters ? 2 : 1;
>     const summaryRowsCount = summaryRows?.length ?? 0;
|     const totalHeaderHeight = headerRowHeight + (enableFilters ? headerFiltersHeight : 0);
|     const clientHeight = gridHeight - totalHeaderHeight - summaryRowsCount * rowHeight;
    at Object../node_modules/react-data-grid/lib/DataGrid.js (Columns.js:27)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:100)
    at Module../node_modules/react-data-grid/lib/index.js (index.js:1)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:100)
    at Object../src/components/drivers/csv-viewer.jsx (csv-viewer.jsx:5)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:100)
    at Object../src/components/drivers/index.js (index.js:3)
./node_modules/react-data-grid/lib/DataGrid.js @ Columns.js:27
__webpack_require__ @ bootstrap:789
fn @ bootstrap:100
./node_modules/react-data-grid/lib/index.js @ index.js:1
__webpack_require__ @ bootstrap:789
fn @ bootstrap:100
./src/components/drivers/csv-viewer.jsx @ csv-viewer.jsx:5
__webpack_require__ @ bootstrap:789
fn @ bootstrap:100
./src/components/drivers/index.js @ index.js:3
__webpack_require__ @ bootstrap:789
fn @ bootstrap:100
./src/components/file-viewer.jsx @ file-viewer.jsx:8
__webpack_require__ @ bootstrap:789
fn @ bootstrap:100
./src/app.js @ app.js:7
__webpack_require__ @ bootstrap:789
fn @ bootstrap:100
0 @ xbim-viewer.debug.bundle.js:3043
__webpack_require__ @ bootstrap:789
(anonymous) @ bootstrap:856
(anonymous) @ bootstrap:856
favicon.ico:1 GET http://localhost:8081/favicon.ico 404 (Not Found)
client:48 [WDS] Hot Module Replacement enabled.
client:52 [WDS] Live Reloading enabled.
client:150 [WDS] Errors while compiling. Reload prevented.
errors @ client:150
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/editors/Editor2Container.js 10:29
Module parse failed: Unexpected token (10:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const editor = (React.createElement("div", { onClickCapture: onClickCapture },
|         React.createElement(column.editor2, Object.assign({ row: row, column: column, onRowChange: onRowChange, editorPortalTarget: editorPortalTarget }, props))));
>     if (column.editorOptions?.createPortal) {
|         return createPortal(editor, editorPortalTarget);
|     }
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/editors/EditorContainer.js 15:61
Module parse failed: Unexpected token (15:61)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const isUnmounting = useRef(false);
|     const onClickCapture = useClickOutside(commit);
>     const getInputNode = useCallback(() => editorRef.current?.getInputNode(), []);
|     const commitCancel = useCallback(() => {
|         changeCanceled.current = true;
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/Cell.js 19:40
Module parse failed: Unexpected token (19:40)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     function handleClick() {
>         selectCell(column.editorOptions?.editOnClick);
|         onRowClick?.(rowIdx, row, column);
|     }
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/utils/columnUtils.js 21:23
Module parse failed: Unexpected token (21:23)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         }
|         const column = { ...metricsColumn, width };
>         if (rawGroupBy?.includes(column.key)) {
|             column.frozen = true;
|             column.rowGroup = true;
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/hooks/useViewportRows.js 35:52
Module parse failed: Unexpected token (35:52)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|                 // TODO: should users have control over the generated key?
|                 const id = parentId !== undefined ? `${parentId}__${groupKey}` : groupKey;
>                 const isExpanded = expandedGroupIds?.has(id) ?? false;
|                 const { childRows, childGroups, startRowIndex } = rows[groupKey]; // https://github.com/microsoft/TypeScript/issues/17002
|                 const groupRow = {
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/hooks/useViewportColumns.js 5:48
Module parse failed: Unexpected token (5:48)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { ValueFormatter } from '../formatters';
| export function useViewportColumns({ rawColumns, columnWidths, viewportWidth, scrollLeft, defaultColumnOptions, rawGroupBy, rowGrouper }) {
>     const minColumnWidth = defaultColumnOptions?.minWidth ?? 80;
|     const defaultFormatter = defaultColumnOptions?.formatter ?? ValueFormatter;
|     const defaultSortable = defaultColumnOptions?.sortable ?? false;
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/DataGrid.js 64:41
Module parse failed: Unexpected token (64:41)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|     const headerRowsCount = enableFilters ? 2 : 1;
>     const summaryRowsCount = summaryRows?.length ?? 0;
|     const totalHeaderHeight = headerRowHeight + (enableFilters ? headerFiltersHeight : 0);
|     const clientHeight = gridHeight - totalHeaderHeight - summaryRowsCount * rowHeight;
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/hooks/useFocusRef.js 7:20
Module parse failed: Unexpected token (7:20)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         if (!isCellSelected)
|             return;
>         ref.current?.focus({ preventScroll: true });
|     }, [isCellSelected]);
|     return ref;
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client:159 ./node_modules/react-data-grid/lib/Row.js 8:29
Module parse failed: Unexpected token (8:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| function Row({ cellRenderer: CellRenderer = Cell, className, eventBus, rowIdx, isRowSelected, copiedCellIdx, draggedOverCellIdx, row, viewportColumns, selectedCellProps, onRowClick, rowClass, setDraggedOverRowIdx, onMouseEnter, top, 'aria-rowindex': ariaRowIndex, 'aria-selected': ariaSelected, ...props }, ref) {
|     function handleDragEnter() {
>         setDraggedOverRowIdx?.(rowIdx);
|     }
|     className = clsx('rdg-row', `rdg-row-${rowIdx % 2 === 0 ? 'even' : 'odd'}`, {
errors @ client:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:48 [WDS] Hot Module Replacement enabled.
client?16fb:52 [WDS] Live Reloading enabled.
client?16fb:150 [WDS] Errors while compiling. Reload prevented.
errors @ client?16fb:150
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/editors/Editor2Container.js 10:29
Module parse failed: Unexpected token (10:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const editor = (React.createElement("div", { onClickCapture: onClickCapture },
|         React.createElement(column.editor2, Object.assign({ row: row, column: column, onRowChange: onRowChange, editorPortalTarget: editorPortalTarget }, props))));
>     if (column.editorOptions?.createPortal) {
|         return createPortal(editor, editorPortalTarget);
|     }
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/editors/EditorContainer.js 15:61
Module parse failed: Unexpected token (15:61)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const isUnmounting = useRef(false);
|     const onClickCapture = useClickOutside(commit);
>     const getInputNode = useCallback(() => editorRef.current?.getInputNode(), []);
|     const commitCancel = useCallback(() => {
|         changeCanceled.current = true;
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/Cell.js 19:40
Module parse failed: Unexpected token (19:40)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     function handleClick() {
>         selectCell(column.editorOptions?.editOnClick);
|         onRowClick?.(rowIdx, row, column);
|     }
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/utils/columnUtils.js 21:23
Module parse failed: Unexpected token (21:23)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         }
|         const column = { ...metricsColumn, width };
>         if (rawGroupBy?.includes(column.key)) {
|             column.frozen = true;
|             column.rowGroup = true;
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/hooks/useViewportRows.js 35:52
Module parse failed: Unexpected token (35:52)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|                 // TODO: should users have control over the generated key?
|                 const id = parentId !== undefined ? `${parentId}__${groupKey}` : groupKey;
>                 const isExpanded = expandedGroupIds?.has(id) ?? false;
|                 const { childRows, childGroups, startRowIndex } = rows[groupKey]; // https://github.com/microsoft/TypeScript/issues/17002
|                 const groupRow = {
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/hooks/useViewportColumns.js 5:48
Module parse failed: Unexpected token (5:48)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { ValueFormatter } from '../formatters';
| export function useViewportColumns({ rawColumns, columnWidths, viewportWidth, scrollLeft, defaultColumnOptions, rawGroupBy, rowGrouper }) {
>     const minColumnWidth = defaultColumnOptions?.minWidth ?? 80;
|     const defaultFormatter = defaultColumnOptions?.formatter ?? ValueFormatter;
|     const defaultSortable = defaultColumnOptions?.sortable ?? false;
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/DataGrid.js 64:41
Module parse failed: Unexpected token (64:41)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|     const headerRowsCount = enableFilters ? 2 : 1;
>     const summaryRowsCount = summaryRows?.length ?? 0;
|     const totalHeaderHeight = headerRowHeight + (enableFilters ? headerFiltersHeight : 0);
|     const clientHeight = gridHeight - totalHeaderHeight - summaryRowsCount * rowHeight;
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/hooks/useFocusRef.js 7:20
Module parse failed: Unexpected token (7:20)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         if (!isCellSelected)
|             return;
>         ref.current?.focus({ preventScroll: true });
|     }, [isCellSelected]);
|     return ref;
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962
client?16fb:159 ./node_modules/react-data-grid/lib/Row.js 8:29
Module parse failed: Unexpected token (8:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| function Row({ cellRenderer: CellRenderer = Cell, className, eventBus, rowIdx, isRowSelected, copiedCellIdx, draggedOverCellIdx, row, viewportColumns, selectedCellProps, onRowClick, rowClass, setDraggedOverRowIdx, onMouseEnter, top, 'aria-rowindex': ariaRowIndex, 'aria-selected': ariaSelected, ...props }, ref) {
|     function handleDragEnter() {
>         setDraggedOverRowIdx?.(rowIdx);
|     }
|     className = clsx('rdg-row', `rdg-row-${rowIdx % 2 === 0 ? 'even' : 'odd'}`, {
errors @ client?16fb:159
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:888
SockJS._transportMessage @ sockjs.js:886
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2962

标签: reactjsnpmvisual-studio-code

解决方案


推荐阅读