babel / babelify

Browserify transform for Babel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use with globally installed browserify?

jcubic opened this issue · comments

After running this:

npm install -g @babel/preset-env babelify browserify

and

browserify ./node_modules/tetris-engine/dist/index.js -g babelify --presets @babel/preset-env -o tetris-engine.js --standalone tetris

got error:

Error: Cannot find module 'babelify' from '/home/kuba/projects/tmp'

There should be a way to use browserify installed globally like normal global application. It seems that you need to install babelify into each local npm package you're building it with.

It seems that it's issue with browserify that don't support global parameter. browserify/browserify#1560