CharlesFeng47 / charlesfeng.cn

Personal website running on Gatsby, React, and Node.js, inspired by Tania Rascia.
https://charlesfeng.cn/
4 stars 0 forks source link

ERROR #98123 WEBPACK Generating development JavaScript bundle failed #2

Closed umarhadi closed 3 years ago

umarhadi commented 3 years ago

Hi, I got problem when execute yarn dev, I've been trying to update all dependencies and devDependencies but I got same problem. Here's my cmd output :

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn>yarn dev
yarn run v1.22.10
$ yarn run develop
$ gatsby develop
success open and validate gatsby-configs - 0.300s
success load plugins - 3.285s
success onPreInit - 0.068s
success initialize cache - 0.014s
success copy gatsby files - 0.280s
success onPreBootstrap - 0.060s
success createSchemaCustomization - 0.702s
success Checking for changed pages - 0.003s
success source and transform nodes - 0.759s
success building schema - 0.853s
info Total nodes: 324, SitePage nodes: 108 (use --verbose for breakdown)
success createPages - 0.205s
success Checking for changed pages - 0.002s
success createPagesStatefully - 0.201s
success update schema - 0.053s
success write out redirect data - 0.004s
success Build manifest and related icons - 0.008s
success onPostBootstrap - 0.026s
info bootstrap finished - 14.583s
success onPreExtractQueries - 0.003s
success extract queries from components - 1.117s
success write out requires - 0.120s
warn code block or inline code language not specified in markdown. applying generic code block
success run page queries - 1.954s - 3/3 1.54/s

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn\src\components\Footer.js
  18:22  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)

File: src\components\Footer.js

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn\src\components\Navigation.js
  10:22  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)

File: src\components\Navigation.js

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn\src\context\ThemeContext.js
  12:9  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)

File: src\context\ThemeContext.js

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn\src\layout\index.js
  10:22  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)

File: src\layout\index.js

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn\src\pages\404.js
  9:22  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)

File: src\pages\404.js

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

C:\Users\uhsis\Documents\GitHub\charlesfeng.cn\src\pages\blog.js
  10:9  error  Parsing error: Unexpected token =

✖ 1 problem (1 error, 0 warnings)

File: src\pages\blog.js

failed Building development bundle - 18.558s

and here's package.json

  "dependencies": {
    "eslint-utils": "2.1.0",
    "gatsby": "2.32.0",
    "gatsby-image": "2.11.0",
    "gatsby-plugin-catch-links": "2.10.0",
    "gatsby-plugin-feed": "2.13.0",
    "gatsby-plugin-google-analytics": "2.11.0",
    "gatsby-plugin-manifest": "2.12.0",
    "gatsby-plugin-netlify": "2.11.0",
    "gatsby-plugin-nprogress": "2.10.0",
    "gatsby-plugin-offline": "3.10.0",
    "gatsby-plugin-react-helmet": "3.10.0",
    "gatsby-plugin-sass": "^3.2.0",
    "gatsby-plugin-sharp": "2.14.0",
    "gatsby-plugin-sitemap": "2.12.0",
    "gatsby-remark-autolink-headers": "2.11.0",
    "gatsby-remark-copy-linked-files": "2.10.0",
    "gatsby-remark-images": "3.11.0",
    "gatsby-remark-prismjs": "3.13.0",
    "gatsby-source-filesystem": "2.11.0",
    "gatsby-transformer-remark": "2.16.0",
    "gatsby-transformer-sharp": "2.12.0",
    "gatsby-remark-embed-itunes": "1.1.4",
    "lodash": "4.17.20",
    "lodash.kebabcase": "4.1.1",
    "moment": "2.29.1",
    "node-sass": "5.0.0",
    "prismjs": "1.23.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-github-btn": "1.2.0",
    "react-helmet": "6.1.0",
    "sharp": "0.27.1",
    "url-join": "4.0.1"
  },
  "devDependencies": {
    "babel-eslint": "10.1.0",
    "cli-glob": "0.1.0",
    "eslint": "7.19.0",
    "eslint-config-airbnb": "18.2.1",
    "eslint-config-prettier": "7.2.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsx-a11y": "6.4.1",
    "eslint-plugin-react": "7.22.0",
    "prettier": "2.2.1",
    "remark-cli": "9.0.0",
    "remark-preset-lint-recommended": "5.0.0",
    "stylefmt": "6.0.3",
    "stylelint": "13.9.0",
    "stylelint-config-standard": "20.0.0",
    "write-good": "1.0.4"
  },

Thanks in advance:)

CharlesFeng47 commented 3 years ago

Hi, I see you have closed this issue... So I think you have already fixed this problem.😂 And that would be great if you could share about how you fixed it incase anybody had the same problem. Thanks!

umarhadi commented 3 years ago

I give up haha. 😂 I’m closed this issue because, when I deployed with default version dependecies on package.json, It works with no problems. But, I cannot run yarn dev on my local computer. Hope you can help me with upgrade version dependecies haha, Thanks

CharlesFeng47 commented 3 years ago

Actually, I cannot run yarn dev on my local computer right now as well... However, I remember I could when I started this project and I just could not make it someday suddenly, but it still works fine on Netlify/Travis, so I thought there might be some dependencies conflict with other projects because I need to handle another project at that time by coincidence. At last, I just let it go because it's not emergent and everything goes well on the deployment.

Anyway, the problem is not only on my own local computer and I would try to fix it if I had time. 😃

umarhadi commented 3 years ago

Yassss, Thank you. Hope you had more time, have a nice day!😁

CharlesFeng47 commented 3 years ago

Hi there! I tried to solve the compile errors on my own local computer and these errors are related to my macOS version Catalina and Homebrew, so I solved mine and found it do not make sense to your case. 😂 Anyway, you made me to solve it, Thanks!!!

Then I checked your error logs and think this on StackOverflow would be helpful. Try it! 😛