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

Demo broken #143

Closed
mattberkowitz opened this issue Jan 22, 2016 · 5 comments
Closed

Demo broken #143

mattberkowitz opened this issue Jan 22, 2016 · 5 comments

Comments

@mattberkowitz
Copy link
Contributor

After getting the latest code I am no longer able to run the local demo.

Firstly, running npm run demo gives a module error, which I solved by running npm install babel-core --save-dev

After that npm run demo executes correctly. Navigating to http://localhost:8080 gives a console error "Uncaught SyntaxError: Unexpected token import" Which seems to indicate the transformer isn't converting the es6.

I've also tried updating the moduleserve package to 0.5.0 which is slightly newer to no avail.

I'll keep poking around and post solutions as I find them.

@marijnh
Copy link
Member

marijnh commented Jan 22, 2016

I get the same problem when I reinstall babel-core (which indeed, was missing from package.json). The new version somehow doesn't find .babelrc when loaded in the way that the transform loads it, and thus doesn't do any actual transformation. I haven't been able to figure out why that is.

@mattberkowitz
Copy link
Contributor Author

Ok, got it running. You need to:

npm install babel-core
npm install babel-preset-es2015

in ProseMirror

and make the change mentioned marijnh/moduleserve#1 as a temp fix until it's properly loading .babelrc

@marijnh
Copy link
Member

marijnh commented Jan 22, 2016

Attached patch specifies the dependency and bumps the moduleserve version dep to 0.6.0. This fixes the issue for me. Could you verify?

@pboysen
Copy link

pboysen commented Jan 22, 2016

I spent all yesterday trying to fix the same thing. I found that .babelrc must be in the source path or a parent. I then had to install the presets as a module in the same directory as .babelrc. It all depends on how your project is laid out.

@mattberkowitz
Copy link
Contributor Author

@marijnh Works great!

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