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

error in parcel/transformer-js #3

Open
anabrnjasevic opened this issue Apr 21, 2023 · 1 comment
Open

error in parcel/transformer-js #3

anabrnjasevic opened this issue Apr 21, 2023 · 1 comment

Comments

@anabrnjasevic
Copy link

when following instructions I get error "Build failed.

@parcel/transformer-js: Expression expected" pointing to

> 5 | render(<App />,document.getElementById('app'));
>   |               ^
 6 | 
 7 | if (module.hot) {

when trying

npx parcel index.html

this is my eslint.json

{
  "env": {
    "es6": true,
    "browser": true
  },
  "extends": ["eslint:recommended", "plugin:react/recommended"],
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "plugins": ["react"],
  "rules": {
    "semi": "error",
    "no-console": 0,
    "react/jsx-uses-vars": "error"
  }
}

and package.json

{
  "name": "wholeproject",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "parcel build src/index.html"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-eslint": "^10.1.0",
    "eslint": "^8.38.0",
    "eslint-plugin-react": "^7.32.2",
    "postcss": "^8.4.23",
    "postcss-preset-env": "^8.3.2"
  },
  "dependencies": {
    "parcel": "^2.8.3"
  }
}

any help would be appreciated since all of this is new to me...

@devusexu
Copy link

devusexu commented Jul 21, 2023

Hi, same error here.
I solved it by install the missing packages which should be auto installed by parcel.
You can see the issue I post

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

2 participants