Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #7261
Closed
Open
Issue created Jun 22, 2019 by Administrator@rootContributor

can not create react app Unexpected end of JSON input while parsing near '...webpack-dev-middlewar'

Created by: Evan-Tsai17

Is this a bug report?

(write your answer here) yes

Did you try recovering your dependencies?

(Write your answer here.) There is actually no package.json preinstalled .

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

(paste the output of the command here) $ npx create-react-app react-spa-demo npx: 91 安装成功,用时 46.343 秒

Creating a new React app in D:\WebstormProjects\react-spa-demo.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts...

npm ERR! Unexpected end of JSON input while parsing near '...webpack-dev-middlewar'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache_logs\2019-06-22T07_18_33_539Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

Deleting generated file... package.json Deleting react-spa-demo/ from D:\WebstormProjects Done.

Steps to Reproduce

(Write your steps here:)

  1. npx create-react-app react-spa-demo

Expected Behavior

(Write what you thought would happen.) create this app successfully without exceptions

Actual Behavior

(Write what happened. Please add screenshots!) $ npx create-react-app react-spa-demo npx: 91 安装成功,用时 46.343 秒

Creating a new React app in D:\WebstormProjects\react-spa-demo.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts...

npm ERR! Unexpected end of JSON input while parsing near '...webpack-dev-middlewar'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache_logs\2019-06-22T07_18_33_539Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

Deleting generated file... package.json Deleting react-spa-demo/ from D:\WebstormProjects Done.

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Assignee
Assign to
Time tracking