Problems running node/karma/phantomjs on Linux VM after getting it working on Windows/Cygwin

57 views
Skip to first unread message

David Karr

unread,
Oct 29, 2014, 4:08:10 PM10/29/14
to nod...@googlegroups.com
On my Win7/Cygwin laptop, I had node/karma/phantomjs working fine, which I use from the "maven-karma-plugin" in Maven.

I'm now trying to use a Linux VM sharing the same Windows filesystem.  It's not clear to me exactly what my constraints will be here.  When I just tried to navigate into a project directory that has an existing "node_modules" tree (which was installed on Windows) and run a build, it fails to find karma.  At that point, I manually patched my PATH to find the "karma" script in the "node_modules" tree in my current directory.  When I ran the build again, it then failed to start PhantomJS, although it doesn't say why.

What sorts of problems might I be having here?  Is it possible to share the "node_modules" tree between the two platforms?

Floby

unread,
Oct 30, 2014, 5:37:25 AM10/30/14
to nod...@googlegroups.com
it is surprisingly not that safe to share node_modules trees between platform.
For example, Karma uses PhantomJS which is a binary executable (not portable) and also uses socket.io which in turn uses ws which uses a compiled addon (not portable).

John Shaver

unread,
Oct 30, 2014, 10:17:59 AM10/30/14
to nod...@googlegroups.com

One problem I've seen with node running in a linux vm off of the host filesystem is that VirtualBox (and probably most virtualization software) disables symlinks on the shared filesystem for security reasons.  npm uses symlinks when installing(probably to prevent duplicating files of the same module version.)

If that is the problem, you can solve this by either installing the modules without symlinks (check the npm manual for the correct switch) or allow symlinks in your host virtualization software (depends on the software).

Sorry for top posting, sent from my phone.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/d3f47f49-6b9b-4769-8060-e4b38f593e8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Shaver

unread,
Oct 30, 2014, 11:37:39 AM10/30/14
to nod...@googlegroups.com
On Thu, Oct 30, 2014 at 3:37 AM, Floby <floren...@gmail.com> wrote:
> For example, Karma uses PhantomJS which is a binary executable (not
> portable) and also uses socket.io which in turn uses ws which uses a
> compiled addon (not portable).


That would be a problem too. I wasn't actually using/installing the
modules from windows in my case, they were just stored there for
persistence between VMs. That's good to know.

-John
Reply all
Reply to author
Forward
0 new messages