solettaproject / soletta-dev-app

Soletta Development Application
Apache License 2.0
7 stars 13 forks source link

'multer': middleware not shipped with dev-app standalone tar.gz #141

Closed chongyic closed 7 years ago

chongyic commented 8 years ago

@brunobottazzini multer node module does not come together with soletta-dev-app_standalone_v1_beta10.tar.gz and cause dev-app-server not able to start. User need to manually run npm to install it. Can this be included in the package or recipe?

fulong82 commented 7 years ago

Hi @brunobottazzini & @bdilly,

With the soletta-dev-app v1_beta10 package and meta-soletta v10, we are encountering that soletta-dev-app-server.service can not be loaded. Below showing the error message:

root@intel-corei7-64:~# /usr/bin/node /opt/soletta-dev-app/server/app.js
module.js:338
    throw err;
          ^
Error: Cannot find module 'multer'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at module.exports (/opt/soletta-dev-app/server/tools.js:20:18)
    at /opt/soletta-dev-app/server/routes.js:24:26
    at Object.<anonymous> (/opt/soletta-dev-app/server/routes.js:477:2)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

Can the "multer" dependency issue being solved at meta-soletta soletta-dev-app_git.bb file?

Thanks & Regards, Wilson

yongli3 commented 7 years ago

@fulong82 FYI I uploaded a PR https://github.com/solettaproject/meta-soletta/pull/113 for this issue

@ceolin @edersondisouza could you share more information about the file soletta-dev-app_standalone_v1_beta10.tar.gz? how to generate this .tar.gz file? I execute the "install.sh" script in soletta-dev-app, and found it is different than this .tar.gz file. A lot of node_modules/* files are missing in the .tar.gz file

anselmolsm commented 7 years ago

Please check my comment at https://github.com/solettaproject/meta-soletta/pull/113 and https://github.com/solettaproject/soletta-dev-app/releases/tag/v1_beta11 as well.

chongyic commented 7 years ago

@anselmolsm @fulong82 Thanks for generating the package. I have tested the package and I found there is a lib file that might cause issue. selenium-webdriver/lib/firefox/i386/libnoblur.so In my build it complains architecture mismatch since I am building for x64 system.

peijiajames commented 7 years ago

I am wondering why original package does not suffer this platform dependent issue. Is current package creating method different from the original one?

chongyic commented 7 years ago

@peijiajames This particular node module is not in the previous release. I am not sure how the package is generated but there is slightly different in the content of package.json and everything else seems working well.

anselmolsm commented 7 years ago

Hey @peijiajames @chongyic . Yes, I saw bitbake complaints about this binary, I had to remove the 32-bit .so while generating for x86_64. Notice modules listed in package.json bring their own dependencies as well, that's why the content of node_modules contains more things than listed in package.json.

anselmolsm commented 7 years ago

@peijiajames since there is no info regarding the package generation, we can assume it is different.

anselmolsm commented 7 years ago

v1_beta11-2 package: node_modules dir content reduced from 134 to 38 with npm prune --production. This also removed the selenium-webdriver binary mentioned above.

I'll submit a PR with a simple script to generate the release package, so we can work on it for other improvements.

anselmolsm commented 7 years ago

PR #146

peijiajames commented 7 years ago

@anselmolsm thanks for the update. Yes, as the original process is not clear defined, it's better to clarify it now :)

@chongyic can you check if v1_beta11-2 package solve the problem your are facing?

peijiajames commented 7 years ago

@chongyic @fulong82 did you have a chance to test v1_beta11-2 package for multer issue?

chongyic commented 7 years ago

Hi @peijiajames @fulong82 and I already tested the package and it is working fine. Thanks.

peijiajames commented 7 years ago

@chongyic thanks. Then do you think we can close this task now?

BTW, I see @anselmolsm started the effort of dev-app package generation script, and I think it worth another task as it is general script improvement rather than multer module issue. @anselmolsm your idea?

fulong82 commented 7 years ago

Hi @peijiajames,

The package is ok, but how about the soletta-dev-app_git.bb fix for using the working tarball? https://github.com/solettaproject/meta-soletta/pull/113

yongli3 commented 7 years ago

@fulong82 I think #113 should be abandoned. the .bb file should use the downloaded beta11-2 .tar.gz file

peijiajames commented 7 years ago

Agree. I think #113 is the hacker way for adding multer dependency in BB file manually. It is not needed as we already have the official package generation script solution from @anselmolsm :)

fulong82 commented 7 years ago

@yongli3 So do you mean you will abandon the implementation in PR#113 and re-submit the changes below for PR#113 or create new PR?

image

yongli3 commented 7 years ago

YES @fulong82 please check on https://github.com/solettaproject/meta-soletta/pull/115

anselmolsm commented 7 years ago

BTW, I see @anselmolsm started the effort of dev-app package generation script

Yes, please see PR #146.

When that PR gets merged, we can close this issue.