require('nodeunit') fails after npm install?
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
I don't know that this is a nodeunit bug, so much, but it has me stumped.
Using node 0.2.6, I installed nodeunit via npm. When I require nodeunit, though, it blows up:
crapple:node-v0.2.6 kurt$ node
> require('nodeunit')
Error: Cannot find module 'nodeunit'
at loadModule (node.js:275:15)
at require (node.js:411:14)
at cwdRequire (repl:29:10)
at [object Context]:1:1
at Interface. (repl:96:19)
at Interface.emit (events:31:17)
at Interface._ttyWrite (readline:309:12)
at Interface.write (readline:147:30)
at Stream. (repl:79:9)
at Stream.emit (events:31:17)
I have node installed into ~/opt/, all my other npm packages are working fine. Can someone point me in the right direction?
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with Node 0.2.6 by installing nodeunit through npm, then running require('nodeunit') from the Node REPL. Check the installation location and module-resolution behavior around ~/opt/ and compare it with the other working npm packages. Done means identifying why nodeunit is not found and documenting or correcting the installation path so the require succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- developer-experience, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100