jasmine-npm: Can't run jasmine
After installing the last version (2.4.0) under npm -v => 3.3.6 and node -v => v5.0.0 I tried to run jasmine and got errors.
- npm install jasmine
- ./node/.bin/jasmine init
- ./node/.bin/jasmine
Error
./node_modules/.bin/jasmine
module.js:443
throw err;
^
SyntaxError: /home/rianby64/Testing/demo/spec/support/jasmine.json: Unexpected token /
at Object.parse (native)
at Object.Module._extensions..json (module.js:440:27)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Jasmine.loadConfigFile (/home/rianby64/Testing/demo/node_modules/jasmine/lib/jasmine.js:83:16)
at runJasmine (/home/rianby64/Testing/demo/node_modules/jasmine/lib/command.js:92:11)
at Command.run (/home/rianby64/Testing/demo/node_modules/jasmine/lib/command.js:49:7)
at Object.<anonymous> (/home/rianby64/Testing/demo/node_modules/jasmine/bin/jasmine.js:11:9)
If run jasmine examples I got error too
./node_modules/.bin/jasmine examples
fs.js:856
return binding.readdir(pathModule._makeLong(path));
^
Error: ENOENT: no such file or directory, scandir '/home/rianby64/Testing/demo/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at copyFiles (/home/rianby64/Testing/demo/node_modules/jasmine/lib/command.js:186:24)
at Object.installExamples [as action] (/home/rianby64/Testing/demo/node_modules/jasmine/lib/command.js:127:3)
at Command.run (/home/rianby64/Testing/demo/node_modules/jasmine/lib/command.js:47:20)
at Object.<anonymous> (/home/rianby64/Testing/demo/node_modules/jasmine/bin/jasmine.js:11:9)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
Thanks in advance
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 18 (7 by maintainers)
Commits related to this issue
- Update jasmine init command for Node.js in getting started - See jasmine/jasmine-npm#60 — committed to jasmine/jasmine.github.io by deleted user 6 years ago
I am on
jasmine@2.5.3still the same problem.I installed jasmine as my dev dependency, now
jasmine initreturnsNo command 'jasmine' found,...I was able to run it using this command:
./node_modules/.bin/jasmine init@ankitrg that is a node.js/npm thing. If you have Jasmine installed globally, it will be available without the
node_modulesprefix, but as long as it is only installed in the project it won’t.