solettaproject/soletta-dev-app

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

Closed this issue · 20 comments

@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?

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

@fulong82 FYI I uploaded a PR solettaproject/meta-soletta#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 @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.

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

@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.

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.

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

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 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?

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

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

@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?

Hi @peijiajames,

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

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

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 :)

@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

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.