Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Uncaught SyntaxError: Unexpected identifier #74

Open
imran-saleem834 opened this issue Dec 24, 2018 · 4 comments
Open

Uncaught SyntaxError: Unexpected identifier #74

imran-saleem834 opened this issue Dec 24, 2018 · 4 comments

Comments

@imran-saleem834
Copy link

In console got this error, react is not working with that

@imran-saleem834
Copy link
Author

screen shot 2018-12-24 at 7 45 38 pm

here is output here window

@imran-saleem834
Copy link
Author

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Hello World! 23</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
</head>

<body id="host">
<script type="application/javascript">
    import React from 'react';
    import ReactDOM from 'react-dom';
    import TodoApp from './components/TodoApp';

    ReactDOM.render(React.createComponent(TodoApp), document.getElementById('host'));
</script>

</body>
</html>

@imran-saleem834
Copy link
Author

{
  "name": "electron-quick-start",
  "version": "1.0.0",
  "description": "A minimal Electron application",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  },
  "repository": "https://github.com/electron/electron-quick-start",
  "keywords": [
    "Electron",
    "quick",
    "start",
    "tutorial",
    "demo"
  ],
  "author": "GitHub",
  "license": "CC0-1.0",
  "devDependencies": {
    "electron": "^3.0.13",
    "electron-prebuilt-compile": "^4.0.0-beta.X"
  },
  "dependencies": {
    "react": "^16.7.0",
    "react-dom": "^16.7.0"
  }
}

@akkuankka
Copy link

I'm having a similar issue, although the result is somewhat different. My issue involves the same import error occurring in the cli.js file.
At line 3:
import electron from 'electron';
I believe what this means is somewhere along the line ECMAScript is not being included. Which is weird, because I believe theoretically electron accepts ECMAScript natively. However this may have something to do with the fact that I manually inserted 4.0.0beta to my project instead of waiting for it to be available through npm.

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

No branches or pull requests

2 participants