1
votes

I have download a github repository.

in the file called .babelrc.json, I have this:

{
  "presets": [
    "es2015",
    "stage-0"
  ],
  "plugins": [
    "transform-runtime",
    "add-module-exports",
    "transform-decorators-legacy"
  ]
}

When I run gulp dev, I get the following error:

ReferenceError: Unknown plugin "transform-runtime" specified in "C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\.babelrc" at 0, attempted to resolve relative to "C:\Users\ \Tolotra Samuel\PhpstormProjects\easy-essay" at C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:17 at Array.map (native) at Function.normalisePlugins (C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20) at OptionManager.mergeOptions (C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:36) at OptionManager.init (C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12) at compile (C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-register\lib\node.js:103:45) at loader (C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-register\lib\node.js:144:14) at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Tolotra Samuel\PhpstormProjects\easy-essay\node_modules\babel-register\lib\node.js:154:7) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12)

As mentionned in the readme file, I already ran npm install and bower install. What am I missing?

1

1 Answers

4
votes
yarn add babel-plugin-transform-runtime

solved for me, what about for you?

or npm or bower. But don't forget to refer to babel-plugin mentioned above. Its a lib from babel. Looks like its a bug refered to install babel globally =)

prob you got an error refering to es2015 after so try this >

yarn add babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-2 --dev