Skip to content

coc extension contains C code cannot be build when CocInstall #4960

Answered by fannheyward
Freed-Wu asked this question in Q&A
Discussion options

You must be logged in to vote

If there is a binding.gyp file in the root of your package and you haven't defined your own install or preinstall scripts, npm will default the install command to compile using node-gyp via node-gyp rebuild
https://docs.npmjs.com/cli/v10/using-npm/scripts#npm-install

npm install runs node-gyp rebuild automatically in project that contains native add-ons binding.gyp

CocInstall steps:

  1. download and extract extension tar file from https://registry.npmjs.org to extensions folder ~/.config/coc/extensions/node_modules, with an uniq temp folder
  2. the extension contains bundled lib/index.js file, maybe with some dependencies
  3. npm install --ignore-scripts --no-lockfile --omit=dev --legacy-peer-deps…

Replies: 1 comment 17 replies

Comment options

You must be logged in to vote
17 replies
@Freed-Wu
Comment options

@fannheyward
Comment options

@Freed-Wu
Comment options

@Freed-Wu
Comment options

@Freed-Wu
Comment options

Answer selected by Freed-Wu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants