score:3

This error log points out what's happening:

    npm install
    npm ERR! code EJSONPARSE
    npm ERR! file /Users/user/Projects/ReactReduxNetTest/ReactReduxNetTest/ClientApp/package.json
    npm ERR! JSON.parse Failed to parse json
    npm ERR! JSON.parse Unexpected token } in JSON at position 1528 while parsing near '...sh": ">=4.17.21",
    npm ERR! JSON.parse   },
    npm ERR! JSON.parse   "browserslist":...'
    npm ERR! JSON.parse Failed to parse package.json data.
    npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm is trying to parse /Users/user/Projects/ReactReduxNetTest/ReactReduxNetTest/ClientApp/package.json but it can't, because it found an unexpected character in the package.json file.

This is actually a bug in the .NET templates that have a malformed package.json file: https://github.com/dotnet/aspnetcore/issues/37520

To fix it, remove the extra comma in ">=4.17.21", in this line in package.json:

   "lodash": ">=4.17.21", 
 },

It should look like this:

   "lodash": ">=4.17.21"
 },

That is the same as the fix Microsoft made in the .NET template here.


Related Query

More Query from same tag