Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chokidar.js 'return' outside of function #207

Closed
simo54 opened this issue Nov 6, 2021 · 2 comments
Closed

chokidar.js 'return' outside of function #207

simo54 opened this issue Nov 6, 2021 · 2 comments

Comments

@simo54
Copy link

simo54 commented Nov 6, 2021

I was trying to install and run the boilerplate using yarn but I got the following error when I launched the start script

[BABEL] Note: The code generator has deoptimised the styling of \react-pwa\node_modules\react-dom\cjs\react-dom.development.js as react-pwa\node_modules\@babel\core\lib\parser\index.js:93
    throw err;
    ^

SyntaxError: react-pwa\node_modules\watchpack\lib\chokidar.js: 'return' outside of function. (4:1)

  2 | try {
  3 |   module.exports = require("chokidar");
> 4 |   return;
    |   ^
  5 | } catch(e) {
  6 |   v3Err = e;
  7 | }
    at Object._raise (\react-pwa\node_modules\@babel\parser\src\parser\error.js:147:45)
    at Object.raiseWithData (\react-pwa\node_modules\@babel\parser\src\parser\error.js:142:17)
    at Object.raise (\react-pwa\node_modules\@babel\parser\src\parser\error.js:91:17)
    at Object.parseReturnStatement (\react-pwa\node_modules\@babel\parser\src\parser\statement.js:671:12)
    at Object.parseStatementContent (react-pwa\node_modules\@babel\parser\src\parser\statement.js:289:21)
    at Object.parseStatement (\react-pwa\node_modules\@babel\parser\src\parser\statement.js:243:17)
    at Object.parseBlockOrModuleBlockBody (\react-pwa\node_modules\@babel\parser\src\parser\statement.js:979:25)
    at Object.parseBlockBody (\react-pwa\node_modules\@babel\parser\src\parser\statement.js:955:10)
    at Object.parseBlock (\react-pwa\node_modules\@babel\parser\src\parser\statement.js:925:10)
    at Object.parseTryStatement (\react-pwa\node_modules\@babel\parser\src\parser\statement.js:761:23) {
  loc: Position { line: 4, column: 1 },
  pos: 57,
  code: 'BABEL_PARSE_ERROR',
  reasonCode: 'IllegalReturn'
}

This is my package.json

{
  "name": "react-pwa",
  "version": "2.2.13",
  "description": "A highly scalable, Progressive Web Application foundation with the best Developer Experience (DX).",
  "scripts": {
    "start": "pawjs --no-cache --env=development start",
    "build": "pawjs --no-cache --env-config-path=./.prod.env --env=production build",
    "build:demo": "pawjs --no-cache --env-config-path=./.demo.env --env=production build",
    "lint": "pawjs lint",
    "test": "pawjs --no-cache test"
  },
  "author": {
    "name": "Atyantik Technologies",
    "email": "admin@atyantik.com",
    "url": "https://www.atyantik.com/"
  },
  "contributors": [
    {
      "name": "Tirth Bodawala",
      "email": "tirthbodawala@atyantik.com",
      "url": "https://www.atyantik.com/"
    },
    {
      "name": "Ajay Patel",
      "email": "ajaypatel@atyantik.com",
      "url": "https://www.atyantik.com/"
    }
  ],
  "license": "MIT",
  "dependencies": {
    "@pawjs/pawjs": "^3.1.7",
    "bulma": "^0.9.3",
    "cloudinary": "^1.24.0",
    "cross-fetch": "^3.1.4"
  },
  "devDependencies": {
    "typescript": "^4.4.2"
  }
}

Is there any missing configuration that I skipped?

@deepaksawant321
Copy link

Remove chokidar.js from *node_modules\watchpack\lib*

@tirthbodawala
Copy link
Member

@deepaksawant321 @simo54 This has been solved for windows in the latest build 2.2.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants