Code Monkey home page Code Monkey logo

Comments (12)

bnoordhuis avatar bnoordhuis commented on September 16, 2024

If you're targeting another architecture, you can pass --arch <name> to npm or node-gyp. If you're targeting another operating system, I think you'll need to export GYP_DEFINES="-DOS=<name>" before running node-gyp. You should also set the CC.target and CXX.target environment variables.

Keep in mind that not all modules are amenable to cross-compiling so YMMV.

from help.

luisfpinto avatar luisfpinto commented on September 16, 2024

Where is npm located once I have compiled nodejs soruce files?

from help.

bnoordhuis avatar bnoordhuis commented on September 16, 2024

In deps/npm? It's not installed until you run make install but you would not normally do that when you're cross-compiling.

from help.

luisfpinto avatar luisfpinto commented on September 16, 2024

Then, what have I to do? :]

from help.

bnoordhuis avatar bnoordhuis commented on September 16, 2024

Do what? Please be specific and ask closed questions when possible.

from help.

luisfpinto avatar luisfpinto commented on September 16, 2024

Well, I will try to be more specific. I have cross compiled Nodejs. But now, I'm trying to cross-compile a npm module. I've seen that I have npm in deps/npm but I don't know how to continue.

Thank you :D

from help.

bnoordhuis avatar bnoordhuis commented on September 16, 2024

Let's make sure we're talking about the same thing. What module in "trying to cross-compile a npm module" are you referring to?

from help.

luisfpinto avatar luisfpinto commented on September 16, 2024

The express module

from help.

bnoordhuis avatar bnoordhuis commented on September 16, 2024

You don't need to cross-compile express. It's just JS, no compiling needed.

from help.

luisfpinto avatar luisfpinto commented on September 16, 2024

Well I also want socket.io module. I think I have to compile that.

from help.

bnoordhuis avatar bnoordhuis commented on September 16, 2024

It has native bits but I think those are optional. If you want to give cross-compiling a go, see my first comment on how to approach that.

from help.

luisfpinto avatar luisfpinto commented on September 16, 2024

This issue can be closed. Thank you!

from help.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.