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
  • #637
Closed
Open
Issue created Sep 13, 2016 by Administrator@rootContributor

Unexpected token (7:2) You may need an appropriate loader to handle this file type.

Created by: guivho

Ran create-react-app react-my-create-react-app-created followed by npm start with this error result:

Error in d:/src/react-my-create-react-app-created/src/index.js
Module parse failed: d:\src\react-my-create-react-app-created\src\index.js Unexpected token (7:2)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (7:2)

and here's the devtools console output:

[HMR] Waiting for update signal from WDS...
webpack:///multi_main?:4 Uncaught Error: Cannot find module "c:\Users\guivh\src\react-my-create-react-app-created\src\index"
client:23 [WDS] Hot Module Replacement enabled.
client:46 [WDS] Errors while compiling.
client:48 d:/src/react-my-create-react-app-created/src/index.js
Module parse failed: d:\src\react-my-create-react-app-created\src\index.js Unexpected token (7:2)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (7:2)
    at Parser.pp$4.raise (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:2221:15)
    at Parser.pp.unexpected (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:603:10)
    at Parser.pp$3.parseExprAtom (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1822:12)
    at Parser.pp$3.parseExprSubscripts (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1597:21)
    at Parser.pp$3.parseExprList (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:2165:22)
    at Parser.pp$3.parseSubscripts (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1741:35)
    at Parser.pp$3.parseExprSubscripts (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1718:17)
    at Parser.pp$3.parseMaybeUnary (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1597:21)
    at Parser.pp$3.parseExpression (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1573:21)
 @ multi main

npm version is 3.10.4 node version ia v6.3.1

Please advise

Assignee
Assign to
Time tracking