npm i / npm ci for multiple target archs #648
-
I can't find any documentation on the --target-arch and --target-platform arguments to Is that possible in a single command? if not several? if several, how would I know if files had been overwritten? How could I confirm the state of my node_modules is correct? Does |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Just bumping this up - I don't think I'm asking for any code here, just some clarification of documentation / some advice please? @MylesBorins sorry to tag - is there anyone you know who might be able to answer this question please? |
Beta Was this translation helpful? Give feedback.
-
are you building a package that you want to distribute binaries for, or just trying to package up your project that is building third party packages? |
Beta Was this translation helpful? Give feedback.
-
@samskiter I think the article you referenced actually gets a number of things wrong. Checking in your Example: Although not recommended, many package maintainers also use With this in mind, & for the best results, it makes sense to run That said, if you run As per @nlf's note, |
Beta Was this translation helpful? Give feedback.
@samskiter I think the article you referenced actually gets a number of things wrong. Checking in your
node_modules
folder will not ensure that your project/application will work across different architectures/platforms. We do a best effort to install dependencies but there are a number of conditions which may meannpm install
does not make the samenode_modules
across different platforms/architectures.Example:
npm
will actually fail to install optional dependencies if their supportedos
(process.platform
) orcpu
(ie.process.arch
) definitions mismatch the current platforms/environment (this is why they're considered optional & we do a best effort in all cases).engines
(ref. https://doc…