marklogic-community / marklogic-samplestack

A sample implementation of the MarkLogic Reference Architecture
Apache License 2.0
82 stars 56 forks source link

Error with first time setup of Node.js Samplestack #682

Closed gregnist closed 8 years ago

gregnist commented 9 years ago

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!

gregnist commented 9 years ago

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

gghai commented 9 years ago

What version of the npm this machine has ?

gregnist commented 9 years ago

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.

gghai commented 9 years ago

https://github.com/marklogic/marklogic-samplestack/wiki/Version-Compatibility

You can try : npm install -g npm@2.1.11

gregnist commented 9 years ago

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.

laurelnaiad commented 8 years ago

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