Skip to content

Cannot find module 'jsdom' #2642

Closed
Closed
@japgolly

Description

@japgolly

Hi. Using 0.6.13 I decided to try out nodejs & jsdom.

The only Scala.JS test setting I set is:

requiresDOM := true

I installed jsdom globally, see here:

> npm list -g jsdom
/usr/lib
└── jsdom@9.8.3 

However when I run tests I get:

> sbt 
[info] Loading global plugins from /home/golly/.sbt/0.13/plugins
[info] Loading project definition from /home/golly/projects/scalajs-react/project
[info] Set current project to root (in build file:/home/golly/projects/scalajs-react/)
> test
[info] Fast optimizing /home/golly/projects/scalajs-react/test/target/scala-2.11/test-test-fastopt.js
[error] module.js:474
[error]     throw err;
[error]     ^
[error] 
[error] Error: Cannot find module 'jsdom'
[error]     at Function.Module._resolveFilename (module.js:472:15)
[error]     at Function.Module._load (module.js:420:25)
[error]     at Module.require (module.js:500:17)
[error]     at require (internal/module.js:20:19)
[error]     at [stdin]:35:17
[error]     at [stdin]:93:3
[error]     at ContextifyScript.Script.runInThisContext (vm.js:25:33)
[error]     at Object.exports.runInThisContext (vm.js:77:17)
[error]     at Object.<anonymous> ([stdin]-wrapper:6:22)
[error]     at Module._compile (module.js:573:32)
[trace] Stack trace suppressed: run last test/test:loadedTestFrameworks for the full output.
[error] (test/test:loadedTestFrameworks) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: Node.js with JSDOM exited with code 1
[error] Total time: 13 s, completed 05/11/2016 7:13:44 PM

Versions are:

> node --version
v7.0.0
> npm --version 
3.10.9

Do you see something I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis is a question on using Scala.js. Closed because it should go to Stack Overflow or gitter.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions