FormidableLabs / inspectpack

An inspection tool for Webpack frontend JavaScript bundles.
MIT License
592 stars 20 forks source link

Bug: Error invoking CLI #95

Closed ZebraFlesh closed 5 years ago

ZebraFlesh commented 5 years ago

I get the following error whenever I try to run inspectwebpack:

$ inspectpack --help
/Users/NOPE/.nvm/versions/node/v10.13.0/bin/inspectpack: line 1: use strict: command not found
/Users/NOPE/.nvm/versions/node/v10.13.0/bin/inspectpack: line 2: syntax error near unexpected token `exports,'
/Users/NOPE/.nvm/versions/node/v10.13.0/bin/inspectpack: line 2: `Object.defineProperty(exports, "__esModule", { value: true });'

It's super weird: it's as if inspectpack is attempting to directly execute the lib/index.js file. I'm seeing similar errors on Windows 10 (same node version).

inspectpack: 4.0.0 OS: macOS Mojave 10.14.1 node: 10.13.0 npm 6.4.1 nvm: 0.33.11

ryan-roemer commented 5 years ago

Thanks @ZebraFlesh !

Confirmed and a fix is in the works.

In the meantime, node node_modules/.bin/inspectpack or node node_modules/inspectpack/bin/inspectpack.js should work.