#reactjs #npm #visual-studio-code
#reactjs #npm #visual-studio-code
Вопрос:
Я изучаю Reactjs и наткнулся на этот репозиторий GitHub plangrid / react-file-viewer. Когда я пытаюсь следовать инструкциям, я вижу это:
Для запуска демонстрационного приложения
make start запустит демонстрационное приложение, обслуживаемое webpack-dev-server
Запуск make start
в терминале VSCode выдает ошибку:
PS L:tempreact-file-viewer-masterreact-file-viewer-master > сделать запуск make : термин «make» не распознается как имя командлета, функции, файла сценария или рабочей программы. исправьте и повторите попытку. В строке: 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
Комментарии:
1. Кажется, у вас не установлен make — Здесь вы можете скачать
make
для Windows. Однако, если вы посмотрите на Makefile для react-file-viewer , вы увидите, чтоmake start
команда по сути выполняетnpm start
команду. Таким образом, вы, вероятно, можете запускатьnpm start
без необходимости установкиmake
.2. Спасибо, я мог бы запустить его, как вам грустно, с помощью `npm start, но получаю только розовый экран и ошибку . Я использую launch.json для начала отладки, может быть, именно поэтому