Rollup: Having trouble w/ babel rollup preset

Created on 9 Aug 2016  路  3Comments  路  Source: rollup/rollup

command

$ rollup -c
Error transforming C:\Users\jacob\Documents\projects\utemplate\src\ntemplate.js with 'babel' plugin: It looks like your Babel configuration specifies a module transformer. Please disable it. If you're using the "es2015" preset, consider using "es2015-rollup" instead. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information
Error: Error transforming C:\Users\jacob\Documents\projects\utemplate\src\ntemplate.js with 'babel' plugin: It looks like your Babel configuration specifies a module transformer. Please disable it. If you're using the "es2015" preset, consider using "es2015-rollup" instead. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information
    at preflightCheck (C:\Users\jacob\Documents\projects\utemplate\node_modules\rollup-plugin-babel\dist\rollup-plugin-babel.cjs.js:43:102)
    at Object.transform$1 [as transform] (C:\Users\jacob\Documents\projects\utemplate\node_modules\rollup-plugin-babel\dist\rollup-plugin-babel.cjs.js:104:18)
    at C:\Users\jacob\AppData\Roaming\npm\node_modules\rollup\src\utils\transform.js:13:35
    at process._tickCallback (internal/process/next_tick.js:103:7)
    at Function.Module.runMain (module.js:577:11)
    at startup (node.js:160:18)
    at node.js:445:3
Type rollup --help for help, or visit https://github.com/rollup/rollup/wiki

rollup.config.js

import json from 'rollup-plugin-json';
import babel from 'rollup-plugin-babel';

export default {
  entry: 'src/ntemplate.js',
  format: 'cjs',
  plugins: [ json(), babel() ],
  dest: 'index.js'
};

src/.babelrc

{
  "presets": ["es2015-rollup"]
}

Don't understand what I did wrong... "babel-preset-es2015-rollup": "^1.2.0", is definitely installed (and in package.json)

Most helpful comment

Alright, reinstalling npm modules now.

{ utemplate: '2.1.0-0',
  npm: '3.8.6',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '56.1',
  modules: '48',
  node: '6.1.0',
  openssl: '1.0.2h',
  uv: '1.9.0',
  v8: '5.0.71.35',
  zlib: '1.2.8' }

interesting. it took a while to install modules, but after doing so everything seems to be working with a

src/.babelrc

{
  "presets": [
    [
      "es2015",
      {
        "modules": false
      }
    ]
  ],
  "plugins": ["external-helpers"]
}

why did it require a reinstall of modules?

All 3 comments

Why was this closed without supplying a fix?

Works for me. Does this fail if you completely remove node_modules and npm install again? If so, what is the output of npm version?

Alright, reinstalling npm modules now.

{ utemplate: '2.1.0-0',
  npm: '3.8.6',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '56.1',
  modules: '48',
  node: '6.1.0',
  openssl: '1.0.2h',
  uv: '1.9.0',
  v8: '5.0.71.35',
  zlib: '1.2.8' }

interesting. it took a while to install modules, but after doing so everything seems to be working with a

src/.babelrc

{
  "presets": [
    [
      "es2015",
      {
        "modules": false
      }
    ]
  ],
  "plugins": ["external-helpers"]
}

why did it require a reinstall of modules?

Was this page helpful?
0 / 5 - 0 ratings