sporto / elm-example-app

An example Elm single page application
436 stars 85 forks source link

Uncaught SyntaxError: Unexpected identifier #9

Closed brobrts closed 8 years ago

brobrts commented 8 years ago

When I run -npm run dev- from the tutorial just after configuring the project with webpack, I get this error in the console: Uncaught SyntaxError: Unexpected identifier

it points to this in app.js /***/ function(module, exports) {

module Main (..) where  <<<<<<<<<<<

import Html exposing (..)
//...

as you would expect, the Loading... message is displayed on the screen since app.js can't load.

The project builds fine with - npm run build- I made sure to check the versions are what was mentioned in the tutorial, and am plain stumped as to what is causing this.

billyr

The terminal gives no indication of anything wrong. ...bundle valid.

billyr

brobrts commented 8 years ago

I'm getting the same error with the example project from the loader repo and one that uses the loader in another project. It's clearly not anything to do with this repo.

Still, please let me know if others have this same experience - all builds fine and chokes on the import in the generated js file when loading.

brobrts commented 8 years ago

having a parent directory named elm-stuff was conflicting with the one of the same name that elm uses. this solved the problem.

sporto commented 8 years ago

Great, good to hear is fixed

On 27 Apr 2016, at 6:30 AM, billy roberts notifications@github.com wrote:

When I run -npm run dev- from the tutorial just after configuring the project with webpack, I get this error in the console: Uncaught SyntaxError: Unexpected identifier

it points to this in app.js /***/ function(module, exports) {

module Main (..) where <<<<<<<<<<<

import Html exposing (..) //... as you would expect, the Loading... message is displayed on the screen since app.js can't load.

The project builds fine with - npm run build- I made sure to check the versions are what was mentioned in the tutorial, and am plain stumped as to what is causing this.

billyr

The terminal gives no indication of anything wrong. ...bundle valid.

billyr

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub