0

I run npm install but this error can not be solved how to solve this error? error code is given below:

Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: G:\projects\dubole project\Sky-Stars-Client-Side\src\App.js: Unexpected token (20:1)

[0m [90m 18 |[39m [36mimport[39m [33mServiceDetails[39m [36mfrom[39m [32m'./Pages/ServiceDetails/ServiceDetails'[39m[33m;[39m[0m [0m [90m 19 |[39m [36mimport[39m [33mDefaultDashboard[39m [36mfrom[39m [32m'./Pages/Dashboard/DefaultDashboard'[39m[33m;[39m[0m [0m[31m[1m>[22m[39m[90m 20 |[39m [33m<<[39m[33m<<[39m[33m<<[39m[33m<[39m [33mHEAD[39m[0m [0m [90m |[39m [31m[1m^[22m[39m[0m [0m [90m 21 |[39m [36mimport[39m [33mMakeAdmin[39m [36mfrom[39m [32m'./Pages/Dashboard/MakeAdmin/MakeAdmin'[39m[33m;[39m[0m [0m [90m 22 |[39m [33m===[39m[33m===[39m[33m=[39m[0m [0m [90m 23 |[39m [36mimport[39m [33mAllOrders[39m [36mfrom[39m [32m'./Pages/Dashboard/AllOrders/AllOrders'[39m[33m;[39m[0m at Object._raise (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:569:17) at Object.raiseWithData (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:562:17) at Object.raise (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:523:17) at Object.unexpected (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:3601:16) at Object.jsxParseIdentifier (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:7282:12) at Object.jsxParseNamespacedName (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:7292:23) at Object.jsxParseElementName (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:7303:21) at Object.jsxParseOpeningElementAt (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:7396:22) at Object.jsxParseElementAt (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:7429:33) at Object.jsxParseElement (G:\projects\dubole project\Sky-Stars-Client-Side\node_modules@babel\parser\lib\index.js:7504:17) at Object../src/App.js (http://localhost:3000/static/js/bundle.js:10:7) at Object.options.factory (http://localhost:3000/static/js/bundle.js:48643:31) at webpack_require (http://localhost:3000/static/js/bundle.js:48093:33) at fn (http://localhost:3000/static/js/bundle.js:48314:21) at Module../src/index.js (http://localhost:3000/static/js/bundle.js:322:62) at Module.options.factory (http://localhost:3000/static/js/bundle.js:48643:31) at webpack_require (http://localhost:3000/static/js/bundle.js:48093:33) at http://localhost:3000/static/js/bundle.js:49282:37 at http://localhost:3000/static/js/bundle.js:49284:12 ./src/App.js @ bundle.js:10 options.factory @ react refresh:6 webpack_require @ bootstrap:24 fn @ hot module replacement:61 ./src/index.js @ store.js:12 options.factory @ react refresh:6 webpack_require @ bootstrap:24 (anonymous) @ startup:7 (anonymous) @ startup:7

1
  • did you install node.js in your pc from here : nodejs.org/en Commented Jan 11, 2022 at 5:34

1 Answer 1

1
npm install @babel/core @babel/preset-env

try to install babel again and renew your Babel config as such

"presets": [
  "@babel/preset-env"
]
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much. now my code is working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.