marklogic-community / slush-marklogic-node

Slush generator for a MarkLogic/node project
https://github.com/marklogic-community/slush-marklogic-node/wiki
Other
40 stars 28 forks source link

Error trying to run new application #178

Closed dmcassel closed 9 years ago

dmcassel commented 9 years ago

I used the generator to create a project, but it isn't running. I followed these steps:

At this point, I saw an error. Looking at the available tasks, I found the 'test' task shows the same error.

$ gulp test
[13:39:46] Using gulpfile ~/tmp/dmc/gulpfile.js
[13:39:46] Starting 'vet'...
[13:39:46] Analyzing source with JSHint and JSCS
[13:39:46] 'vet' errored after 68 ms
[13:39:46] Error: Cannot find module './lib/_stream_transform.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/dcassel/tmp/dmc/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/transform.js:1:80)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

$ node -v v0.10.31

$ gulp -v [13:40:50] CLI version 3.8.7 [13:40:50] Local version 3.8.11

Do I have a bad version of something? Did slush fail to add something?

grtjn commented 9 years ago

New to me. Does this ring a bell for anyone else?

grtjn commented 9 years ago

@dmcassel Have you tried uninstalling slush-marklogic-node before linking/installing it again? I had some quirks myself because of that, but as early as during the install itself..

grtjn commented 9 years ago

Interesting, googling for that error message seems to indicate it is related to nodejs/npm versions. There are specific combinations that seem to break. Other references suggest to upgrade nodejs. I thought some dependencies require at least 0.10.32, some 0.12. Though I am myself running on 0.10.26 actually, and without issues..

dmcassel commented 9 years ago

I went back to my slush-marklogic-node directory, removed the node_modules directory, and reran "npm install". Saw that some dependencies complained that I didn't have Node 0.12, so I upgraded to 0.12.7, reran npm install, then tried creating another project. Same error as above. I wonder if you might have a more recent version of something installed globally (bower, commander, gulp, jq, jshint, marklogic, mocha, npm, slush).

grtjn commented 9 years ago
$ bower -v
1.4.1

$ gulp -v
[21:13:27] CLI version 3.9.0
[21:13:27] Local version 3.8.11

$ slush -v
[slush] 1.1.1

$ mocha -v
-bash: mocha: command not found

$ commander -v
-bash: commander: command not found

$ jq -v
-bash: jq: command not found

$ npm -v
2.13.1

$ node -v
v0.10.26
grtjn commented 9 years ago

slightly more recent gulp?

hunterwilliams commented 9 years ago

Everything but below matches @grtjn . Will attempt issue to replicate on my machine

bower - 1.5.1 npm - 2.10.1 node - v0.12.4

hunterwilliams commented 9 years ago

Seems to work for me.

dmcassel commented 9 years ago

Worked fine with fresh installs on a VM. Must be a version problem with something on my Mac.