marklogic-samplestack icon indicating copy to clipboard operation
marklogic-samplestack copied to clipboard

._transform is not a function and Error: Bower components directory does not exist at C:\marklogic-samplestack\browser\bower_components

Open MLPOCUser opened this issue 8 years ago • 8 comments

module

this is what I run. abcd@INNASPC6786 MINGW64 /c/marklogic-samplestack

$ gulp run C:\marklogic-samplestack\shared\js\options.js:238 module.exports = _.transform( ^

TypeError: _.transform is not a function at Object. (C:\marklogic-samplestack\shared\js\options.js:238:20) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\marklogic-samplestack\shared\js\dev-tasks\context.js:35:15) at Module._compile (module.js:570:32)

abcd@INNASPC6786 MINGW64 /c/marklogic-samplestack

$ gulp run [09:19:58] Using gulpfile C:\marklogic-samplestack\gulpfile.js [09:19:58] Starting 'clean'... [09:19:58] Finished 'clean' after 2.05 ms [09:19:58] Starting 'bower-files'... [09:19:58] 'bower-files' errored after 493 μs [09:19:58] Error: Bower components directory does not exist at C:\marklogic-samplestack\browser\bower_components at module.exports (C:\marklogic-samplestack\node_modules\main-bower-files\lib\index.js:54:15) at bowerBuildStream (C:\marklogic-samplestack\shared\js\dev-tasks\tasks\bower-files.js:32:5) at Gulp.func (C:\marklogic-samplestack\shared\js\dev-tasks\tasks\bower-files.js:64:8) at module.exports (C:\marklogic-samplestack\node_modules\orchestrator\lib\runTask.js:34:7) at Gulp.Orchestrator._runTask (C:\marklogic-samplestack\node_modules\orchestrator\index.js:273:3) at Gulp.Orchestrator._runStep (C:\marklogic-samplestack\node_modules\orchestrator\index.js:214:10) at C:\marklogic-samplestack\node_modules\orchestrator\index.js:279:18 at finish (C:\marklogic-samplestack\node_modules\orchestrator\lib\runTask.js:21:8) at cb (C:\marklogic-samplestack\node_modules\orchestrator\lib\runTask.js:29:3) at next (C:\marklogic-samplestack\node_modules\rimraf\rimraf.js:70:7)

MLPOCUser avatar Sep 01 '17 03:09 MLPOCUser

Thanks for logging. If you're a registered customer you can also log in through the support portal so we can assign a support engineer. Otherwise can you tell me more about your environment? What version of MarkLogic are you using? In the meantime it would also help to know if you are blocked on figuring out how something specific works since it appears you are working on a POC.

popzip avatar Sep 01 '17 18:09 popzip

I am using marklogic 9 version and Node v6.11.0 for deploying this application

MLPOCUser avatar Sep 04 '17 04:09 MLPOCUser

Samplestack was released a couple of years ago and has only been tested to work with MarkLogic version 8, available here, and Node v0.10. For now I'd recommend exploring the code in the repository as a sample and not trying to run it on your system. If you have specific questions on why a particular design choice was made or how an API works feel free to post it in here.

popzip avatar Sep 05 '17 16:09 popzip

as per your recommendation now I am using node v0.10 and marklogic 8 version but it showing following error

Code-Machine MINGW64 /c/marklogic-samplestack/browser $ gulp run [21:16:44] Working directory changed to C:\marklogic-samplestack [21:16:46] Using gulpfile C:\marklogic-samplestack\gulpfile.js [21:16:46] Starting 'clean'... [21:16:46] Finished 'clean' after 14 ms [21:16:46] Starting 'bower-files'... [21:16:46] Finished 'bower-files' after 81 ms [21:16:46] Starting 'build'... [21:16:47] 'build' errored after 623 ms [21:16:47] Error in plugin 'gulp-jshint' Message: Invalid reporter [21:16:47] processing files [21:16:47] saw 221 files

capture1

MLPOCUser avatar Sep 12 '17 15:09 MLPOCUser

can you try this

sudo chown -R $(whoami) ~/.npm
npm cache clean 

popzip avatar Sep 15 '17 06:09 popzip

I just tried with master branch with node v0.10.33 and worked fine for me.

Based on the initial error message, it appears that you may not have installed bower packages. Please make sure to install under marklogic-samplestack/browser and not in app root.

From the second error, I'm suspecting it may have to do with gulp version installed globally which may not be compatible with build code (I could be completely wrong). Try using local gulp instead of globally installed version From app root, you can reference local gulp like so, ./node_modules/gulp/bin/gulp.js run.

Let me know how it goes.

csreddy avatar Sep 15 '17 20:09 csreddy

I have done all the steps you guys(popzip , csreddy ) suggested like npm cache clean and installed bower packages under marklogic-samplestack/browser directory

but still facing the same issue.

Code-Machine MINGW64 /c/marklogic-samplestack/browser $ gulp run [17:23:31] Working directory changed to C:\marklogic-samplestack [17:23:31] Using gulpfile C:\marklogic-samplestack\gulpfile.js [17:23:31] Starting 'clean'... [17:23:31] Finished 'clean' after 14 ms [17:23:31] Starting 'bower-files'... [17:23:31] Finished 'bower-files' after 81 ms [17:23:31] Starting 'build'... [17:23:32] 'build' errored after 623 ms [17:23:32] Error in plugin 'gulp-jshint' Message: Invalid reporter [17:23:32] processing files [17:23:32] saw 221 files

MLPOCUser avatar Sep 18 '17 08:09 MLPOCUser

can you try the suggestion made on this issue https://github.com/codepunkt/gulp-jscs-stylish/issues/7#issuecomment-104151410 ?

csreddy avatar Sep 19 '17 18:09 csreddy