minidocs
minidocs copied to clipboard
Error in finding minidocs/transform module
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)
- Run in terminal: npm install -g minidocs
- Follow the readme up to browserify index.js -t minidocs/transform > bundle.js
or
- Download/clone the minidocs repo.
- cd to directory of the repo.
- Run in terminal: npm install (works fine).
- Run in terminal: npm start.
Both results in returning the error:
Error: Cannot find module 'minidocs/transform'
Any ideas @sethvincent ?
I'll check this out!
@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.gitcd minidocsnpm installnpm link && npm link minidocs(only needed for making the example run)npm start