1

I face serious problem.

Because when I got a check for json grammer in 'jsonparseronline.com/',

it said all is right, but the error is still existed

WebpackError at /cebula/1Sun/setting ModuleBuildError in Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: C:\Users\1Sun\Cebula3\cebula_react\package.json: Error while parsing JSON - Unexpected token } in JSON at position 450 at JSON.parse () at readConfigPackage (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\files\package.js:57:20) at C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\files\utils.js:29:12 at cachedFunction (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\caching.js:33:19) at findPackageData (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\files\package.js:33:11) at buildRootChain (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\config-chain.js:103:85) at loadPrivatePartialConfig (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\partial.js:57:55) at Object.loadPartialConfig (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\partial.js:82:18) at Object. (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:105:26) at Generator.next () at step (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:221) at _next (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:409) at C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:477 at new Promise () at Object. (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:97) at Object.loader (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:50:18) at Object. (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:45:12) Request Method: GET Request URL: http://127.0.0.1:8000/cebula/1Sun/setting Django Version: 2.0.5 Exception Type: WebpackError Exception Value:
ModuleBuildError in Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: C:\Users\1Sun\Cebula3\cebula_react\package.json: Error while parsing JSON - Unexpected token } in JSON at position 450 at JSON.parse () at readConfigPackage (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\files\package.js:57:20) at C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\files\utils.js:29:12 at cachedFunction (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\caching.js:33:19) at findPackageData (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\files\package.js:33:11) at buildRootChain (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\config-chain.js:103:85) at loadPrivatePartialConfig (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\partial.js:57:55) at Object.loadPartialConfig (C:\Users\1Sun\Cebula3\cebula_react\node_modules\@babel\core\lib\config\partial.js:82:18) at Object. (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:105:26) at Generator.next () at step (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:221) at _next (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:409) at C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:477 at new Promise () at Object. (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:3:97) at Object.loader (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:50:18) at Object. (C:\Users\1Sun\Cebula3\cebula_react\node_modules\babel-loader\lib\index.js:45:12) Exception Location: C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\webpack_loader\loader.py in get_bundle, line 97 Python Executable: C:\Users\1Sun\AppData\Local\Programs\Python\Python36\python.exe Python Version: 3.6.5

package.json

{
  "name": "cebula_react",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server --config ./webpack.config.js --mode development",
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "webpack --config prod.config.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "babel": {
    "presets": [
      "@babel/preset-env",
      "@babel/preset-react"
    ]
  },
  "devDependencies": {
    "@babel/cli": "^7.0.0",
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "babel-loader": "^8.0.2",
    "react-hot-loader": "^4.3.6",
    "webpack": "^4.17.2",
    "webpack-bundle-tracker": "^0.3.0",
    "webpack-cli": "^3.1.0",
    "webpack-dev-server": "^3.1.8"
  },
  "dependencies": {
    "react": "^16.5.0",
    "react-dom": "^16.5.0"
  }
}

Could you teach me where is the problem?

1Sun
  • 2,305
  • 5
  • 14
  • 21
  • Start removing one line at a time until you find the line with the problem. – Matt Runion Sep 09 '18 at 12:37
  • 1
    nope, the `JSON` syntax error originates from http://127.0.0.1:8000/cebula/1Sun/setting response... obviously the wrong configuration `JSON` had been posted. good there was the stack-trace, which I'd almost found a little long, at first. – Martin Zeitler Sep 09 '18 at 12:43
  • Looks like the issue is at cebula_react\node_modules\@babel\core\lib\config\files\package.js:57 – Ioan Sep 09 '18 at 13:27
  • @MartinZeitler oh thanks, the problem is in response part not in package.json itself! Could I ask one more question? I'm trouble in dealing with https://stackoverflow.com/questions/52237855/support-for-the-experimental-syntax-classproperties-isnt-currently-enabled?noredirect=1#comment91424857_52237855 – 1Sun Sep 09 '18 at 13:27

0 Answers0