New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where does node_modules/nodeos-barebones/node_modules go during build? #218

Closed
timmbrooks opened this Issue Mar 8, 2016 · 10 comments

Comments

Projects
None yet
3 participants
@timmbrooks

timmbrooks commented Mar 8, 2016

IDK what is going on:

$ find . -name adjustEnvVars.sh
./node_modules/nodeos-barebones/node_modules/nodeos-cross-toolchain/scripts/adjustEnvVars.sh

$ npm install

> NodeOS@0.0.0 install /home/tbrooks/Projects/nodeos
> scripts/build

scripts/build: line 7: /home/myprofile/Projects/node_modules/nodeos-barebones/node_modules/nodeos-cross-toolchain/scripts/adjustEnvVars.sh: No such file or directory

npm ERR! Linux 4.4.1-2-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm  v3.7.1
npm ERR! code ELIFECYCLE
npm ERR! NodeOS@0.0.0 install: `scripts/build`
npm ERR! Exit status 1
npm ERR! etc...

$ find . -name adjustEnvVars.sh
$ 

Any clues?

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Mar 8, 2016

Member

Npm 3 is not supported, downgrade to npm 2 or use Node.js 4.x. This is a known bug due to npm 2 plain dependencies, hope when nodeos-crosstools is an independent module this gets fixed. Any help here is welcome.

Member

piranna commented Mar 8, 2016

Npm 3 is not supported, downgrade to npm 2 or use Node.js 4.x. This is a known bug due to npm 2 plain dependencies, hope when nodeos-crosstools is an independent module this gets fixed. Any help here is welcome.

@piranna piranna referenced this issue Apr 8, 2016

Closed

Prebuilds, again #224

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Jun 12, 2016

Member

master now don't have the cross-toolchain inside barebones but instead it's an independent module, and also I'm improved the support of having the dependencies anywhere, could you be able to check again if it works with npm 3?

Member

piranna commented Jun 12, 2016

master now don't have the cross-toolchain inside barebones but instead it's an independent module, and also I'm improved the support of having the dependencies anywhere, could you be able to check again if it works with npm 3?

@timmbrooks

This comment has been minimized.

Show comment
Hide comment
@timmbrooks

timmbrooks Jun 12, 2016

Good to hear. I'm traveling but will be able to pull and test tomorrow. Will advise.

timmbrooks commented Jun 12, 2016

Good to hear. I'm traveling but will be able to pull and test tomorrow. Will advise.

@lite20

This comment has been minimized.

Show comment
Hide comment
@lite20

lite20 Jun 12, 2016

Member

I'd run the test but am likely to hit errors not even related to npm3's existence

Member

lite20 commented Jun 12, 2016

I'd run the test but am likely to hit errors not even related to npm3's existence

@timmbrooks

This comment has been minimized.

Show comment
Hide comment
@timmbrooks

timmbrooks Jun 13, 2016

I got to build. I had to step into nodeos-rootfs, -usersfs, -barebones, -initramfs and do 'npm install' separate (I didn't find anything in 'out' directory) and for -usersfs I had to 'npm rebuild'. When using npm start after everything built, I kept getting qemu error:
qemu-system-x86_64: error while loading shared libraries: libgnutls.so.26: cannot open shared object file: No such file or directory

but I could start up with:
qemu-system-x86_64 -enable-kvm -vga std -m 256M -redir tcp:50080::80 -redir tcp:50443::443 --kernel out/latest/barebones --initrd out/latest/initramfs -hda out/latest/usersfs
and ended up with a REPL.

So I think this specific issue is resolved for npm 3, but there may be something else going on. Will leave to you if this should be closed.

timmbrooks commented Jun 13, 2016

I got to build. I had to step into nodeos-rootfs, -usersfs, -barebones, -initramfs and do 'npm install' separate (I didn't find anything in 'out' directory) and for -usersfs I had to 'npm rebuild'. When using npm start after everything built, I kept getting qemu error:
qemu-system-x86_64: error while loading shared libraries: libgnutls.so.26: cannot open shared object file: No such file or directory

but I could start up with:
qemu-system-x86_64 -enable-kvm -vga std -m 256M -redir tcp:50080::80 -redir tcp:50443::443 --kernel out/latest/barebones --initrd out/latest/initramfs -hda out/latest/usersfs
and ended up with a REPL.

So I think this specific issue is resolved for npm 3, but there may be something else going on. Will leave to you if this should be closed.

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Jun 13, 2016

Member

Well, these are good news... sort of :-)

The problem on this issue (cross-toolchain was disappearing) is fixed since now the cross-toolchain is an independent module, but NodeOS build system is not yet npm3 ready because they changed the lifecycle and now it seems the install step is only executed once when installing a module, but no more when it's finally installed in place. Could you be able to check what's the npm3 lifecycle and if there's some scripts executed when a module is installed? I'll try to do it myself here too to compare.

The QEmu error is unrelated to npm3, it seems it's more related to a system libraries problem, so maybe we could fix it by compiling QEmu itself statically. What do you think?

Member

piranna commented Jun 13, 2016

Well, these are good news... sort of :-)

The problem on this issue (cross-toolchain was disappearing) is fixed since now the cross-toolchain is an independent module, but NodeOS build system is not yet npm3 ready because they changed the lifecycle and now it seems the install step is only executed once when installing a module, but no more when it's finally installed in place. Could you be able to check what's the npm3 lifecycle and if there's some scripts executed when a module is installed? I'll try to do it myself here too to compare.

The QEmu error is unrelated to npm3, it seems it's more related to a system libraries problem, so maybe we could fix it by compiling QEmu itself statically. What do you think?

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Jun 14, 2016

Member

I have just check it and confirmed: npm3 only execute preinstall, install, postinstall and prepublish scripts on the root project, not its dependencies, so it's assumed that once a dependency is installed its "frozen" and in a good state.

This will make us change the build process, but hopefully not so bad, mostly use install script to only download the dependencies and later do the build itself on its own script (build is a good candidate :-) ) by executing npm run build, and from it call the build scripts of the needed dependencies. Ugly, I know, but seems to be the only way... On the other hand, this would allow us to define an argument to set the path where the objects and products will be stored, instead of have them inside the dependency layers folders, what do you think?

Member

piranna commented Jun 14, 2016

I have just check it and confirmed: npm3 only execute preinstall, install, postinstall and prepublish scripts on the root project, not its dependencies, so it's assumed that once a dependency is installed its "frozen" and in a good state.

This will make us change the build process, but hopefully not so bad, mostly use install script to only download the dependencies and later do the build itself on its own script (build is a good candidate :-) ) by executing npm run build, and from it call the build scripts of the needed dependencies. Ugly, I know, but seems to be the only way... On the other hand, this would allow us to define an argument to set the path where the objects and products will be stored, instead of have them inside the dependency layers folders, what do you think?

@timmbrooks

This comment has been minimized.

Show comment
Hide comment
@timmbrooks

timmbrooks Jun 14, 2016

Sorry I didn't get to this. I spent a little extra time. Last effort worked:

npm install && npm rebuild && npm install
I haven't investigated much the build process, but firing install after rebuild does something. Perhaps this might suggest a workaround? Perhaps this also is paraphrasing what you suggest as well.

timmbrooks commented Jun 14, 2016

Sorry I didn't get to this. I spent a little extra time. Last effort worked:

npm install && npm rebuild && npm install
I haven't investigated much the build process, but firing install after rebuild does something. Perhaps this might suggest a workaround? Perhaps this also is paraphrasing what you suggest as well.

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Jun 14, 2016

Member

Sort of. On npm2 sometimes I got problems because dependencies are not
fully installed before one module start to install, so executing 'npm
install --ignore-dependencies' first so everything is correctly downloaded
fix it. The same way, by splitting the install and build steps will have in
general the same behaviour, so I think this is the way to go.
El 14/6/2016 19:13, "timmbrooks" notifications@github.com escribió:

Sorry I didn't get to this. I spent a little extra time. Last effort
worked:

npm install && npm rebuild && npm install
I haven't investigated much the build process, but firing install after
rebuild does something. Perhaps this might suggest a workaround? Perhaps
this also is paraphrasing what you suggest as well.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#218 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAgfvhdnQhtKfu1XIcK39V76iaNyTfcfks5qLuFXgaJpZM4HrX-6
.

Member

piranna commented Jun 14, 2016

Sort of. On npm2 sometimes I got problems because dependencies are not
fully installed before one module start to install, so executing 'npm
install --ignore-dependencies' first so everything is correctly downloaded
fix it. The same way, by splitting the install and build steps will have in
general the same behaviour, so I think this is the way to go.
El 14/6/2016 19:13, "timmbrooks" notifications@github.com escribió:

Sorry I didn't get to this. I spent a little extra time. Last effort
worked:

npm install && npm rebuild && npm install
I haven't investigated much the build process, but firing install after
rebuild does something. Perhaps this might suggest a workaround? Perhaps
this also is paraphrasing what you suggest as well.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#218 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAgfvhdnQhtKfu1XIcK39V76iaNyTfcfks5qLuFXgaJpZM4HrX-6
.

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Jun 27, 2016

Member

Fixed in master by using npm3 natively, clossing.

Member

piranna commented Jun 27, 2016

Fixed in master by using npm3 natively, clossing.

@piranna piranna closed this Jun 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment