marklogic-community / marklogic-samplestack

A sample implementation of the MarkLogic Reference Architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with first time setup of Node.js Samplestack

gregnist opened this issue · comments

Hello,
I'm trying to get the Node version of Samplestack up and running. After I successfully perform an npm install from my Samplestack directory, I try to execute the one time setup:

gulp once --browser=chrome

I receive the following error:

image

Any thoughts on what might be the cause / solution?

Thanks!

So in thinking about this more, I tried installing this package directly:

https://www.npmjs.com/package/array-union

npm install --save array-union

This enabled me to proceed. I'm not sure why it didn't get installed when I did the npm install though, as "array-union" is listed as a dependency in package.json

Good to go for now though...thanks

commented

What version of the npm this machine has ?

npm version is 1.4.28

I see the Samplestack documentation on Github does say that one needs npm version 2.2.1 or higher. However, I have tried running from the command line (and as an administrator since I'm on Windows):

npm install npm -g

But I don't get upgraded to any higher npm version when I run that install command.

Trying to do a global install of a specific version of NPM still would not work. I did a bit more digging around and came across this site that is referenced in the npm readme file that I found on my system:

https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

The issue stems from the fact that when Node.js is installed, a version of NPM gets installed along with it, and because of how the classpath is defined it will always use the version of NPM that was installed along with Node and NOT the one installed when one executes a global upgrade command such as:

npm install -g npm@version

I used option 3 outlined on this site to solve my issue and I now have npm version 2.1.11 installed and being used.

Closing this. The next release of SS will be node.js v0.12.x-compatible; node/npm setup should be more fluid.