minidocs icon indicating copy to clipboard operation
minidocs copied to clipboard

Error in finding minidocs/transform module

Open ricky-hu opened this issue 9 years ago • 3 comments
trafficstars

When running a -t minidocs/transform command, error is returned even after installing with -g or cloning the minidocs repo and starting/installing from the repo.

Steps to reproduce:

(Tried both in a windows and OS X environment running latest version of node)

  1. Run in terminal: npm install -g minidocs
  2. Follow the readme up to browserify index.js -t minidocs/transform > bundle.js

or

  1. Download/clone the minidocs repo.
  2. cd to directory of the repo.
  3. Run in terminal: npm install (works fine).
  4. Run in terminal: npm start.

Both results in returning the error:

Error: Cannot find module 'minidocs/transform'

ricky-hu avatar Aug 11 '16 00:08 ricky-hu

Any ideas @sethvincent ?

freeman-lab avatar Aug 11 '16 18:08 freeman-lab

I'll check this out!

sethvincent avatar Aug 11 '16 18:08 sethvincent

@ricky-hu It looks like you may need to install minidocs as a project dependency rather than globally.

When installing globally we expect minidocs to be used as a command-line tool. I'll try and figure out why the transform isn't found when installing globally, but for now if you install like this the browserify command should work:

npm install --save minidocs

cloning the repo:

The cloned repo seems like a separate problem: to make the example & transform work inside the same directory we run npm link inside the cloned repo after running npm install. So the full steps for cloning the repo would look like this:

  • git clone https://github.com/freeman-lab/minidocs.git
  • cd minidocs
  • npm install
  • npm link && npm link minidocs (only needed for making the example run)
  • npm start

sethvincent avatar Aug 11 '16 19:08 sethvincent