0

我正在使用带有插件的西兰花,如下所示:

  • broccoli-babel-transpiler
  • 西兰花漏斗
  • 西兰花
  • 西兰花合并树

但运行后broccoli build dist出现以下错误:

Error: ENOENT, no such file or directory 'E:\newPojects\es6-webiste\node_modules\broccoli-babel-transpiler\index.js\node
_modules\babel-core'
    at Error (native)
    at Object.fs.readdirSync (fs.js:765:18)
    at walkSync (E:\newPojects\es6-webiste\node_modules\broccoli-funnel\node_modules\walk-sync\index.js:14:20)
    at Funnel.processFilters (E:\newPojects\es6-webiste\node_modules\broccoli-funnel\index.js:113:15)
    at Funnel.rebuild (E:\newPojects\es6-webiste\node_modules\broccoli-funnel\index.js:108:10)
    at E:\newPojects\es6-webiste\node_modules\broccoli\lib\api_compat.js:42:21
    at lib$rsvp$$internal$$tryCatch (E:\newPojects\es6-webiste\node_modules\broccoli\node_modules\rsvp\dist\rsvp.js:489:
16)
    at lib$rsvp$$internal$$invokeCallback (E:\newPojects\es6-webiste\node_modules\broccoli\node_modules\rsvp\dist\rsvp.j
s:501:17)
    at E:\newPojects\es6-webiste\node_modules\broccoli\node_modules\rsvp\dist\rsvp.js:1095:13
    at lib$rsvp$asap$$flush (E:\newPojects\es6-webiste\node_modules\broccoli\node_modules\rsvp\dist\rsvp.js:1290:9)

Build failed
4

1 回答 1

0

这似乎是一个路径错误。我尝试如下修改正则表达式,它可以工作

babelPath = babelPath.replace(/\\index.js$/, '');
于 2016-05-13T03:36:20.067 回答