npm ОШИБКА! преждевременное закрытие - PullRequest
1 голос
/ 10 января 2020

Я покупаю и использую ReactJS шаблон. это шаблон, который я использую

Я хочу установить все зависимости, используя npm install в root каталоге шаблонов (React-App)

но я получил ОШИБКА примерно так:

c:\Dev\template>npm install
npm WARN deprecated core-js@2.5.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated react-s-alert@1.4.1: No longer maintained, see more info in readme
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-01-10T19_36_35_673Z-debug.log

После ОШИБКА Я установил эти пакеты (npm install react-script и --save core-js@^3).

и после Я пытаюсь снова, я все еще получаю ОШИБКА


вот зависимости в моих пакетах. json:

...
  "dependencies": {
    "@amcharts/amcharts4": "^4.7.1",
    "@amcharts/amcharts4-geodata": "^4.1.7",
    "@fullcalendar/core": "^4.3.1",
    "@fullcalendar/daygrid": "^4.3.0",
    "@fullcalendar/interaction": "^4.3.0",
    "@fullcalendar/react": "^4.3.0",
    "@fullcalendar/timegrid": "^4.3.0",
    "animate.css": "3.7.0",
    "apexcharts": "^3.10.0",
    "awesome-bootstrap-checkbox": "1.0.1",
    "axios": "^0.18.0",
    "bootstrap": "4.0.0",
    "bootstrap_calendar": "https://github.com/xero/bootstrap_calendar.git#1.0.1",
    "classnames": "^2.2.6",
    "core-js": "^3.6.2",
    "draft-js": "^0.10.5",
    "echarts": "^4.4.0",
    "echarts-for-react": "^2.0.15-beta.1",
    "flot": "^0.8.0-alpha",
    "flot.dashes": "https://github.com/cquartier/flot.dashes.git",
    "font-awesome": "4.7.0",
    "formsy-react": "0.19.5",
    "glyphicons-halflings": "^1.9.1",
    "highcharts": "^7.2.0",
    "highcharts-react-official": "^2.2.2",
    "jasny-bootstrap": "^3.1.3",
    "jsonwebtoken": "^8.5.1",
    "line-awesome": "github:icons8/line-awesome",
    "messenger": "git+https://github.com/HubSpot/messenger.git#v1.4.2",
    "moment": "^2.22.2",
    "nvd3": "1.8.6",
    "rc-color-picker": "^1.2.6",
    "rc-hammerjs": "0.6.9",
    "rc-slider": "^8.7.1",
    "react": "^16.5.2",
    "react-animate-height": "^2.0.15",
    "react-animated-number": "^0.4.4",
    "react-apexcharts": "^1.3.3",
    "react-app-polyfill": "^0.1.3",
    "react-autosize-textarea": "^5.0.0",
    "react-bootstrap-table": "4.1.5",
    "react-bootstrap-table-next": "^3.0.0",
    "react-bootstrap-table2-paginator": "^2.0.3",
    "react-bootstrap-table2-toolkit": "^1.3.1",
    "react-datetime": "^2.16.1",
    "react-dev-utils": "^6.0.5",
    "react-dnd": "^7.3.1",
    "react-dom": "^16.5.2",
    "react-draft-wysiwyg": "1.10.12",
    "react-dropzone": "^6.2.4",
    "react-google-maps": "^9.4.5",
    "react-grid-layout": "^0.16.6",
    "react-images": "^0.5.19",
    "react-maskedinput": "^4.0.1",
    "react-mde": "2.3.4",
    "react-redux": "^5.0.7",
    "react-router": "^4.3.1",
    "react-router-dom": "^4.3.1",
    "react-router-hash-link": "^1.2.1",
    "react-script": "^2.0.5",
    "react-scrollspy": "^3.3.5",
    "react-select": "^3.0.8",
    "react-shuffle": "2.1.0",
    "react-slick": "^0.23.1",
    "react-sortable-hoc": "^1.10.1",
    "react-sortable-tree": "^2.2.0",
    "react-sortablejs": "1.5.0",
    "react-sparklines": "^1.7.0",
    "react-syntax-highlighter": "^10.1.2",
    "react-table": "6.7.6",
    "react-tagsinput": "^3.19.0",
    "react-toastify": "^5.4.0",
    "react-transition-group": "^2.5.2",
    "react-trend": "^1.2.5",
    "reactstrap": "7.1.0",
    "redux": "^4.0.1",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.3.0",
    "rickshaw": "1.6.6",
    "showdown": "1.8.6",
    "skycons": "^1.0.0",
    "sortablejs": "1.10.0",
    "uuid": "^3.3.3"
  },
  "devDependencies": {
    "@babel/core": "7.4.4",
    "@babel/plugin-proposal-class-properties": "7.4.4",
    "@babel/plugin-proposal-optional-chaining": "^7.2.0",
    "@svgr/webpack": "4.2.0",
    "babel-core": "7.0.0-bridge.0",
    "babel-eslint": "10.0.1",
    "babel-jest": "24.8.0",
    "babel-loader": "8.0.5",
    "babel-plugin-named-asset-import": "1.0.0-next.103",
    "babel-preset-react-app": "9.0.0",
    "bfj": "6.1.1",
    "bundle-loader": "0.5.6",
    "case-sensitive-paths-webpack-plugin": "2.2.0",
    "chalk": "2.4.2",
    "css-loader": "2.1.1",
    "dotenv": "8.0.0",
    "dotenv-expand": "5.1.0",
    "eslint": "5.16.0",
    "eslint-config-react-app": "4.0.1",
    "eslint-loader": "2.1.1",
    "eslint-plugin-flowtype": "3.8.1",
    "eslint-plugin-import": "2.17.2",
    "eslint-plugin-jsx-a11y": "6.2.1",
    "eslint-plugin-react": "7.13.0",
    "eslint-plugin-react-hooks": "1.6.0",
    "expose-loader": "0.7.5",
    "file-loader": "3.0.1",
    "fs-extra": "7.0.1",
    "html-webpack-plugin": "4.0.0-alpha.2",
    "identity-obj-proxy": "3.0.0",
    "imports-loader": "0.8.0",
    "jest": "24.8.0",
    "jest-pnp-resolver": "1.2.1",
    "jest-resolve": "24.8.0",
    "lodash.assign": "^4.2.0",
    "lodash.clonedeep": "^4.5.0",
    "mini-css-extract-plugin": "0.6.0",
    "node-sass": "4.12.0",
    "optimize-css-assets-webpack-plugin": "5.0.1",
    "pnp-webpack-plugin": "1.4.3",
    "postcss-flexbugs-fixes": "4.1.0",
    "postcss-loader": "3.0.0",
    "postcss-preset-env": "6.6.0",
    "postcss-safe-parser": "4.0.1",
    "resolve": "1.10.1",
    "sass-loader": "7.1.0",
    "style-loader": "0.23.0",
    "terser-webpack-plugin": "1.2.3",
    "url-loader": "1.1.2",
    "webpack": "4.31.0",
    "webpack-dev-server": "3.3.1",
    "webpack-manifest-plugin": "2.0.4",
    "webpack-raphael": "2.1.4",
    "workbox-webpack-plugin": "4.3.1"
  },
...



Я все еще новичок в ReactJS,
Надеюсь, вы можете мне помочь,
спасибо.

Ответы [ 2 ]

1 голос
/ 24 января 2020

Это может произойти, если в библиотеке есть неверный пакет. json файл. В моем случае библиотека (моя) имела недопустимый номер версии.

1 голос
/ 10 января 2020

Эта ошибка возникает, если в качестве зависимости вы указали библиотеку, но она по какой-то причине не существует.

Подобный пост: Ссылка

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...