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

The "es6" javascript preprocessor was not found. Have you installed it locally? #1563

Closed
daslicht opened this issue Feb 2, 2016 · 14 comments

Comments

@daslicht
Copy link

daslicht commented Feb 2, 2016

When I run riot --type es6 -w app dist

I get:

The "es6" javascript preprocessor was not found. Have you installed it locally?

I am using Node 5
any idea?

@GianlucaGuarini
Copy link
Member

Have you followed all the steps ?

@daslicht
Copy link
Author

daslicht commented Feb 7, 2016

yes, no luck

@daslicht
Copy link
Author

daslicht commented Feb 7, 2016

I tried both teh babel and es6 option :/

riot --type babel source.tag

@daslicht
Copy link
Author

daslicht commented Feb 7, 2016

I am a bit confused by babel and es6 , do you need to setup babel (yes i have tried it) when running with the es6 parameter as I show above ?

@GianlucaGuarini
Copy link
Member

From riot.com

es6 flag + babel5:

All ECMAScript 6 features can be used. Babel 5 is used for the transformation:
npm install babel@5.8

babel flag + babel6

Babel 6 introduced many breaking changes so if you want to use it you should configure your environment first:
install our babel-preset-es2015-riot
npm install babel-preset-es2015-riot --save-dev
install babel-core as well
npm install babel-core --save-dev
create a .babelrc file containing the preset id
{ "presets": ["es2015-riot"] }

Basically if you want to use Babel5 use the --type es6 if you want to use Babel6 use --type babel
If you want to see an example check this

@daslicht
Copy link
Author

daslicht commented Feb 8, 2016

Where did you fi d this info on riot.com , please?

@aMarCruz
Copy link
Contributor

aMarCruz commented Feb 9, 2016

@daslicht , search for "es6" and "babel" in http://riotjs.com/guide/compiler/

Edit: Please close this issue if the doc solves your doubts.

@GianlucaGuarini
Copy link
Member

@daslicht these info were also provided on the link in my previous post I guess we can close this issue because the doc is pretty clear

@daslicht
Copy link
Author

daslicht commented Feb 9, 2016

Looks like something else is wrong here, since I followed the steps

@GianlucaGuarini
Copy link
Member

@daslicht try the following steps to compile a tag using babeljs:

  1. sudo npm install riot babel-core -g
  2. git clone git@github.com:GianlucaGuarini/riot-preset-babel-test.git
  3. cd riot-preset-babel-test
  4. sudo npm install
  5. riot component.tag --type babel

At this point you have 2 possible results:

  • It worked: component.tag -> component.js
  • It didn't work: The "es6" javascript preprocessor was not found. Have you installed it locally?

can you try it please telling me the result?

@daslicht
Copy link
Author

daslicht commented Feb 9, 2016

Thats what I tried to tell you :)
I always got "The "es6" javascript preprocessor was not found. Have you installed it locally?"
Even tho I installed the preprocessor.
Thats is my current package.json

{
  "name": "start",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "clean": "rimraf dist/",
    "watch": "riot --type es6 -w app dist",
    "compile": "riot --type es6 app dist",
    "browsersync": "browser-sync start --server --files 'dist/*.js, app/*.html' --startPath app",
    "serve": "parallelshell 'npm run watch' 'npm run browsersync'",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel": "^6.3.26",
    "es6": "0.0.7",
    "riot": "^2.3.15"
  },
  "devDependencies": {
    "babel": "^6.3.26",
    "babel-core": "^6.4.5",
    "babel-preset-es2015-riot": "^1.0.2",
    "browser-sync": "^2.11.1",
    "parallelshell": "^2.0.0",
    "rimraf": "^2.5.1"
  }
}

I try it again from scratch

GianlucaGuarini added a commit to riot/riot.github.io that referenced this issue Feb 9, 2016
@GianlucaGuarini
Copy link
Member

@daslicht have you installed babel-core globally? sudo npm install babel-core -g I think this is the issue. I have updated the doc

@daslicht
Copy link
Author

Hi,
I finally found the tutorial I was following

@jpoppe
Copy link

jpoppe commented Apr 11, 2016

I have also just spent a couple of hours to get that tutorial (riot) running!

In the hello-world.tag file I had to replace:
<script type='text/es6'>

With:
<script type="babel">

To make it work.

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

No branches or pull requests

4 participants