Closed phtrivier closed 11 years ago
Might be related, but now it's even worse ...
I get this :
phtrivier@murphy:~/prj/platform/workspace_git/testacular/test/e2e/requirejs$ testacular start
module.js:340
throw err;
^
Error: Cannot find module 'optimist'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/phtrivier/prj/platform/apps/testacular/lib/cli.js:2:16)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
I have no idea what to make of this... could this be a dependency issue in testacular package description ? Or is it definitely a problem in my local installation ?
npm install
without the global flag.npm list
for both variants?Hi
It seems like I can't install it without the g flag :
phtrivier@murphy:~/prj/platform/workspace_git/testacular/test/e2e/requirejs$ npm install testacular@canary
npm http GET https://registry.npmjs.org/testacular
npm http 200 https://registry.npmjs.org/testacular
npm http GET https://registry.npmjs.org/testacular/-/testacular-0.5.6.tgz
npm http 200 https://registry.npmjs.org/testacular/-/testacular-0.5.6.tgz
npm WARN prefer global testacular@0.5.6 should be installed with -g
After installing with -g, I get this list :
testacular@0.5.6 /home/phtrivier/prj/platform/workspace_git/testacular
├── chokidar@0.5.0
├── coffee-script@1.4.0
├── colors@0.6.0-1
├── dateformat@1.0.3-1.2.3
├─┬ glob@3.1.14
│ ├── graceful-fs@1.1.14
│ └── inherits@1.0.0
├── growly@1.0.0
├─┬ grunt@0.4.0rc3
│ ├── async@0.1.22
│ ├── coffee-script@1.3.3
│ ├── dateformat@1.0.2-1.2.3
│ ├── eventemitter2@0.4.11
│ ├── findup-sync@0.1.1
│ ├── hooker@0.2.3
│ ├── iconv-lite@0.2.7
│ ├─┬ js-yaml@1.0.3
│ │ └─┬ argparse@0.1.8
│ │ ├── underscore@1.3.3
│ │ └── underscore.string@2.1.1
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.0.3
│ └── underscore.string@2.2.0rc
├─┬ grunt-contrib-jshint@0.1.0
│ └─┬ jshint@0.9.1
│ ├── cli@0.4.3
│ └─┬ minimatch@0.0.5
│ └── lru-cache@1.0.6
├─┬ grunt-jasmine-node@0.0.4
│ └─┬ jasmine-node@1.0.28
│ ├── jasmine-reporters@0.2.1
│ ├── requirejs@2.1.2
│ ├── underscore@1.4.3
│ └── walkdir@0.0.5
├─┬ http-proxy@0.8.5
│ └── pkginfo@0.2.3
├─┬ istanbul@0.1.22
│ ├── abbrev@1.0.3
│ ├── async@0.1.22
│ ├─┬ escodegen@0.0.15
│ │ ├── esprima@1.0.2
│ │ └─┬ source-map@0.1.8
│ │ └── amdefine@0.0.4
│ ├── esprima@0.9.9
│ ├─┬ fileset@0.1.3
│ │ ├─┬ glob@3.0.1
│ │ │ ├── fast-list@1.0.2
│ │ │ ├── graceful-fs@1.1.14
│ │ │ └── inherits@1.0.0
│ │ └─┬ minimatch@0.1.5
│ │ └── lru-cache@1.0.6
│ ├─┬ handlebars@1.0.7
│ │ └── uglify-js@1.2.6
│ ├── mkdirp@0.3.4
│ ├── nopt@2.0.0
│ └── wordwrap@0.0.2
├─┬ LiveScript@1.1.0
│ └── prelude-ls@0.6.0
├── lodash@0.9.2
├─┬ minimatch@0.2.9
│ ├── lru-cache@2.0.4
│ └── sigmund@1.0.0
├── mocks@0.0.10
├─┬ optimist@0.3.5
│ └── wordwrap@0.0.2
├── pause@0.0.1
├── q@0.8.11
├─┬ rimraf@2.0.3
│ └── graceful-fs@1.1.14
├─┬ socket.io@0.9.13
│ ├── base64id@0.1.0
│ ├── policyfile@0.0.4
│ ├── redis@0.7.3
│ └─┬ socket.io-client@0.9.11
│ ├─┬ active-x-obfuscator@0.0.1
│ │ └── zeparser@0.0.5
│ ├── uglify-js@1.2.5
│ ├─┬ ws@0.4.24
│ │ ├── commander@0.6.1
│ │ ├── options@0.0.3
│ │ └── tinycolor@0.0.1
│ └── xmlhttprequest@1.4.2
├── testacular@0.5.6 extraneous
├── which@1.0.5
└── xmlbuilder@0.4.2
npm ERR! extraneous: testacular@0.5.6 /home/phtrivier/prj/platform/workspace_git/testacular/node_modules/testacular
npm ERR! not ok code 0
So I get a version of optimist and handlebars, but testacular is marked as "extraneous"...
You can just remove it, that's because you install it locally first (npm gives warning that Testacular should be installed with -g
, but that does not affect the local installation), so:
rm -rf .../testacular/node_modules/testacular
For integration with requirejs, use this first https://github.com/vojtajina/testacular/tree/master/test/e2e/requirejs Be sure to check out the docs as well https://github.com/vojtajina/testacular/wiki/RequireJS
Feel free to re-open if you still think there is an issue.
I'm trying to use the 'requirejs' integration, as described here :
What I did was :
sudo npm -g install
in the package folderI get an error, module 'handlebars' can not be found :
I fear it could be an npm issue, but I'm not very confortable with nodejs yet, so I'm not sure which direction I have to look into...
Any help welcome.
Thanks.