rollup-plugin-closure-compiler-js icon indicating copy to clipboard operation
rollup-plugin-closure-compiler-js copied to clipboard

Why it is expecting a semi colon?

Open binarykitchen opened this issue 8 years ago • 3 comments

When rolling up with your plugin I see this error

└─( 2 ) ❱❱❱ yarn build                                                                      1 ⏎  +2502 19:27 ❰─┘
yarn build v0.24.6
$ npm run std --silent
$ rollup -c env/prod/rollup.config.js 
100% (748): src/wrappers/optionsWrapper.js⚠️   'default' is not exported by 'node_modules/buffer-es6/index.js'
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
commonjs-proxy:/home/michael-heuberger/code/videomail-client/node_modules/buffer-es6/index.js (1:137)
1: import * as index from "/home/michael-heuberger/code/videomail-client/node_modules/buffer-es6/index.js"; export default ( index && index['default'] ) || index;
                                                                                                                                            ^

Input_0:1 (JSC_PARSE_ERROR)
Parse error. Semi-colon expected
var videomail-client = (function () {
             ^
'use strict';

function createCommonjsModule(fn, module) {
	return module = { exports: {} }, fn(module, module.exports), module.exports;

🚨   (closure-compiler-js plugin) Error transforming bundle with 'closure-compiler-js' plugin: compilation error, 1 error

error Command failed with exit code 1.

To reproduce, git clone this branch https://github.com/binarykitchen/videomail-client/tree/feature/rollupjs and do yarn build

Any tips would be very much appreciated.

binarykitchen avatar Jun 20 '17 07:06 binarykitchen

Well, I would say you cannot create a variable identifier containing - There https://mothereff.in/js-variables#videomail-client a tool to check if JavaScript variable name is valid

Moreover, the definition from MDN

camelaissani avatar Jun 20 '17 23:06 camelaissani

well, i do not have a variable identifier with that name in my branch: https://github.com/binarykitchen/videomail-client/search?utf8=%E2%9C%93&q=videomail-client&type=

only have this in some html files <script src="/videomail-client.js"></script> ... the resource is called videomail-client.js but that should not have an impact, doesn't it?

binarykitchen avatar Jun 20 '17 23:06 binarykitchen

Okay videomail-client is the name of your module. Then I think that's a known issue in rollup https://github.com/rollup/rollup/issues/1345

camelaissani avatar Jun 20 '17 23:06 camelaissani