简体   繁体   English

在“ Users \\\\ PhpstormProjects \\\\ easy-essay \\\\。babelrc”中指定的未知插件“ transform-runtime”

[英]Unknown plugin “transform-runtime” specified in "Users\\PhpstormProjects\\easy-essay\\.babelrc

I have download a github repository. 我已经下载了一个github仓库。

in the file called .babelrc.json, I have this: 在名为.babelrc.json的文件中,我有以下内容:

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

When I run gulp dev , I get the following error: 运行gulp dev ,出现以下错误:

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\\To ReferenceError:在“ C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy-essay \\ .babelrc”中指定的未知插件“转换运行时”为0,试图相对于“ C:\\ Users \\\\ Tolotra Samuel \\ PhpstormProjects \\ easy”进行解析-essay”位于C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy-essay \\ node_modules \\ babel-core \\ lib \\ transformation \\ file \\ options \\ option-manager.js:180:17,位于Array.map(本机)功能.normalisePlugins(C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy-essay \\ node_modules \\ babel-core \\ lib \\ transformation \\ file \\ options \\ option-manager.js:158:20)(位于OptionManager.mergeOptions(C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy-essay \\ node_modules \\ babel-core \\ lib \\ transformation \\ file \\ options \\ option-manager.js:234:36)在OptionManager.init(C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy -essay \\ node_modules \\ babel-core \\ lib \\ transformation \\ file \\ options \\ option-manager.js:368:12)在编译时(C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy-essay \\ node_modules \\ babel-register \\ lib \\ node.js:103:45)在加载程序(C:\\ Users \\ To lotra 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) Lotra Samuel \\ PhpstormProjects \\ easy-essay \\ node_modules \\ babel-register \\ lib \\ node.js:144:14)在Object.require.extensions。(匿名函数)[作为.js](C:\\ Users \\ Tolotra Samuel \\ PhpstormProjects \\ easy-essay \\ node_modules \\ babel-register \\ lib \\ node.js:154:7)在try.ModuleLoad(module.js:447:12)在Module.load(module.js:488:32)

As mentionned in the readme file, I already ran npm install and bower install . 如自述文件中所述,我已经运行了npm installbower install What am I missing? 我想念什么?

yarn add babel-plugin-transform-runtime

solved for me, what about for you? 为我解决了,那你呢?

or npm or bower. 或npm或凉亭。 But don't forget to refer to babel-plugin mentioned above. 但是不要忘了参考上面提到的babel-plugin。 Its a lib from babel. 它是通天塔的解放。 Looks like its a bug refered to install babel globally =) 看起来像是一个在全球范围内安装babel的错误=)

prob you got an error refering to es2015 after so try this > 可能您在引用es2015后遇到错误,因此请尝试此>

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 babelrc中指定的未知插件“transform-object-assign” - Unknown plugin “transform-object-assign” specified in babelrc Babel插件“transform-runtime”仅在首次编译后才有效 - Babel plugin “transform-runtime” only works after first compile 模块构建失败:TypeError:插件“transform-runtime”没有导出插件实例 - Module build failed: TypeError: The plugin "transform-runtime" didn't export a Plugin instance Babel 6转换运行时:$ export不是函数 - Babel 6 transform-runtime: $export is not a function 添加@babel/transform-runtime 插件时无法读取未定义的属性“Reactstrap” - Cannot read property 'Reactstrap' of undefined When adding @babel/transform-runtime plugin Webpack 4 + Babel 7转换运行时-无效的配置对象 - Webpack 4 + Babel 7 transform-runtime - Invalid configuration object .babelrc中指定的Babel 6预设不起作用 - Babel 6 presets specified in .babelrc not working mobx方法注释和babelrc插件顺序 - mobx method annotation and babelrc plugin order ReferenceError:指定了未知插件“react-html-attrs” - ReferenceError: Unknown plugin “react-html-attrs” specified 模块构建失败:ReferenceError:在“ base”中将0指定为未知插件“ import” - Module build failed: ReferenceError: Unknown plugin “import” specified in “base” at 0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM