larsvoigt / epub-full-text-search

Search engine for digital publication based on EPUB 3
MIT License
50 stars 10 forks source link

Installation problem #30

Open rudra07130713 opened 7 years ago

rudra07130713 commented 7 years ago

Hello, I am quite new at these stuff. I am facing some problems while installing the project. I tried installing the project by the command 'npm install epub-full-text-search --save'. After many tiresome attempts, the command is finally running without any error but some warnings. like : C:\Users\11050\Documents>npm install epub-full-text-search --save npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\11050\package.json' npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\11050\package.json' npm WARN 11050 No description npm WARN 11050 No repository field. npm WARN 11050 No README data npm WARN 11050 No license field. npm WARN 11050 Invalid dependency: jasmine-core undefined npm WARN 11050 Invalid dependency: jquery undefined npm WARN 11050 Invalid dependency: jquery-easing undefined I thought a folder containing the code would appear in my Documents directory but there was no such thing. Then I download the project and and from my git bash, ran 'npm install' to install the dependencies. It showed message like 'finished generating code' (with two warnings).

npm WARN babel-loader@6.4.1 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed. npm WARN The package brfs is included as both a dev and production dependency.

Then I tried to run epub-search start and it could not recognize 'epub-search' as a command. So I am back to square one. Where do I proceed from this ? Is my way of installation even correct ?

larsvoigt commented 7 years ago

Hi @rudra07130713, Normally on this way

but I have test it. The latest npm version will not start under windows. It looks like some path \<-> / problems. I will try to fix it tomorrow. Sorry! Best Lars

rudra07130713 commented 7 years ago

Thanks for your reply. I am really struggling with this. Please let me know if you managed to find a solution.

larsvoigt commented 7 years ago

I updated the npm package. Now the latest version should be also working under windows... If you looking for a way to test it -> Example

rudra07130713 commented 7 years ago

The issue is not completely resolved for me . When I run C:\Users\11050>epub-search start The following message appears :

exec path: C:\Users\11050\AppData\Roaming\npm\node_modules\epub-full-text-search\dist\bin

Starting EPUB search ... fs.js:651 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^

Error: ENOENT: no such file or directory, open 'C:\Users\11050.epub-full-text-search\out.log' at Object.fs.openSync (fs.js:651:18) at Object.forever.startDaemon (C:\Users\11050\AppData\Roaming\npm\node_modules\epub-full-text-search\node_modules\forever\lib\forever.js:460:14) at Object. (C:\Users\11050\AppData\Roaming\npm\node_modules\epub-full-text-search\dist\bin\epub-search:52:35) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Function.Module.runMain (module.js:605:10) at startup (bootstrap_node.js:158:16) What am I doing wrong ? I was supposed to add sample epub files after this command . right ?

See #31

rudra07130713 commented 7 years ago

Well, I ignored the error and tried to proceed further. I have a question about indexing epub ? Let's say I have two epubs. Before indexing, should i keep them in a folder and point the 'writeindex' command to that directory ?

I tried seperately indexing each epub but received an error message ' Can`t index empty folder'. What is the correct procedure ?

Another thing, I added a print (console.log) in Preparer.js for my better understanding. However , these changes are not reflecting in the console.

larsvoigt commented 7 years ago

The bug fix can be found at https://github.com/larsvoigt/epub-full-text-search/commit/754de2ed54781508eeb9d117cf64fdbdbf5c0a02.

Well, I ignored the error and tried to proceed further. I have a question about indexing epub ? Let's say I have two epubs. Before indexing, should i keep them in a folder and point the 'writeindex' command to that directory?

Yes, in your case e.g.

epub-search writeToIndex -p "C:\Users\11050\AppData\Roaming\npm\node_modules\epub-full-text-search\node_modules\epub3-samples".

Or each document can be added separately to index epub-search writeToIndex -p "C:\Users\11050\AppData\Roaming\npm\node_modules\epub-full-text-search\node_modules\epub3-samples\accessible_epub_3".

The next version to come contains an "on the fly" index using rest api.

E.g. http://localhost:8085/addToIndex?url=http://localhost:8089/epub_doc&uuid=1c5994db-25e8-4a71-b031-0a689c0d8ed9

I tried seperately indexing each epub but received an error message ' Can`t index empty folder'. What is the correct procedure ?

Phew? Can you post your program starting parameters, please?

Another thing, I added a print (console.log) in Preparer.js for my better understanding. However , these changes are not reflecting in the console.

npm run build to transpile and copy the src to dist folder

rudra0713 commented 7 years ago

Thanks for your help. I have solved most of the issues . However, npm run build command is giving error .

babel ./bin/epub-search --presets babel-preset-es2015 --out-file ./dist/bin/e pub-search && ./node_modules/.bin/babel ./bin/search-engine-CLI --presets babel -preset-es2015 --out-file ./dist/bin/search-engine-CLI

'.' is not recognized as an internal or external command, operable program or batch file. I think the issue might be that folder separator in Windows is \ not /.