power-assert-js / babel-preset-power-assert

Babel preset for all power-assert plugins
MIT License
32 stars 2 forks source link

Cannot find module 'power-assert' #3

Open mysticatea opened 8 years ago

mysticatea commented 8 years ago

README.md does not say requires installing power-assert, but I encountered the error: Cannot find module 'power-assert'. Do I need to install power-assert also?

# I have installed `babel-cli` to global before in order to try small things.
> npm i -g node-cli

# Now I have installed `babel-preset-power-assert` to use it in the test of this module.
> npm i -D babel-register babel-preset-power-assert

# I tried a small experiment with `babel-node` in global.
> babel-node --presets power-assert try.js
module.js:440
    throw err;
    ^

Error: Cannot find module 'power-assert'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.Module._load (module.js:386:25)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (try.js:12:16)
    at Module._compile (module.js:541:32)
    at loader (C:\Users\t-nagashima.AD\nodist\bin\node_modules\babel-cli\node_modules\babel-register\lib\node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\t-nagashima.AD\nodist\bin\node_modules\babel-cli\node_modules\babel-register\lib\node.js:168:7)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)

twada commented 8 years ago

Ah, so sorry. That's a problem. I'll add power-assert as peerDependencies to here and babel-plugin-empower-assert.

And update README too.

Thanks.

mysticatea commented 8 years ago

I got it. Thank you.

FYI: I have not seen PEER_INVALID warning here. :D

> npm i -D babel-register babel-preset-power-assert

+-- babel-preset-power-assert@1.0.0
| +-- babel-plugin-empower-assert@1.3.0
| `-- babel-plugin-espower@2.1.2
|   +-- array-find@1.0.0
|   +-- babel-generator@6.8.0
|   | +-- detect-indent@3.0.1
|   | | +-- get-stdin@4.0.1
|   | | `-- minimist@1.2.0
|   | +-- is-integer@1.0.6
|   | | `-- is-finite@1.0.1
|   | +-- lodash@3.10.1
|   | +-- repeating@1.1.3
|   | +-- source-map@0.5.6
|   | `-- trim-right@1.0.1
|   +-- babylon@6.8.0
|   +-- call-matcher@0.1.0
|   | +-- array-filter@1.0.0
|   | +-- array-foreach@1.0.2
|   | +-- deep-equal@1.0.1
|   | +-- espurify@1.5.1
|   | `-- indexof@0.0.1
|   `-- espower-location-detector@0.1.2
|     +-- is-url@1.2.1
|     `-- source-map@0.5.6
+-- babel-register@6.8.0
| +-- babel-core@6.8.0
| | +-- babel-code-frame@6.8.0
| | | `-- js-tokens@1.0.3
| | +-- babel-helpers@6.8.0
| | +-- babel-messages@6.8.0
| | +-- babel-template@6.8.0
| | | `-- lodash@3.10.1
| | +-- babel-traverse@6.8.0
| | | +-- globals@8.18.0
| | | +-- invariant@2.2.1
| | | | `-- loose-envify@1.1.0
| | | `-- lodash@3.10.1
| | +-- babel-types@6.8.1
| | | +-- lodash@3.10.1
| | | `-- to-fast-properties@1.0.2
| | +-- convert-source-map@1.2.0
| | +-- json5@0.4.0
| | +-- lodash@3.10.1
| | +-- minimatch@2.0.10
| | +-- private@0.1.6
| | +-- shebang-regex@1.0.0
| | +-- slash@1.0.0
| | `-- source-map@0.5.6
| +-- home-or-tmp@1.0.0
| | +-- os-tmpdir@1.0.1
| | `-- user-home@1.1.1
| +-- lodash@3.10.1
| +-- path-exists@1.0.0
| `-- source-map-support@0.2.10
|   `-- source-map@0.1.32
`-- istanbul@0.4.3
  +-- fileset@0.2.1
  | `-- minimatch@2.0.10
  `-- handlebars@4.0.5
    `-- uglify-js@2.6.2
      `-- source-map@0.5.6