unable to install better-sqlite3 on Linux(Centos Stream 9 ) Server
I am trying to deploy strapi application on cenos stream 9 serve.
installed node V22.0 +, and trying to install the dependencies. While my serve is in China so the network may has problem.
according to error below, it shows that (gyp http fetch GET https://nodejs.org/download/release/v20.16.0/node-v20.16.0-headers.tar.gz attempt 1 failed with ETIMEDOUT). I can download it locally and upload to server. While I donot know which folder should I put into .?
yarn install yarn install v1.22.22
[1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [4/5] Linking dependencies... warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@babel/runtime@>=7.11.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/state@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/theme-one-dark@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "@codemirror/view@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/[email protected]" has unmet peer dependency "codemirror@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/autocomplete@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/language@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/lint@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/search@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/react-codemirror > @uiw/[email protected]" has unmet peer dependency "@codemirror/view@>=6.0.0". warning "@strapi/plugin-cloud > @strapi/design-system > @uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup > @codemirror/[email protected]" has unmet peer dependency "@lezer/common@^1.0.0". warning "@strapi/plugin-graphql > [email protected]" has unmet peer dependency "koa@^2.13.1". warning "@strapi/plugin-graphql > [email protected]" has unmet peer dependency "koa@^2". warning " > [email protected]" has unmet peer dependency "react-is@>= 16.8.0". warning "styled-components > babel-plugin-styled-components > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0". warning Workspaces can only be enabled in private projects. [5/5] Building fresh packages... [6/10] ⠐ sharp [9/10] ⠐ @apollo/protobufjs [-/10] ⠐ waiting... [-/10] ⠐ waiting... error /www/wwwroot/strapi_neon/strapi_blog/node_modules/better-sqlite3: Command failed. Exit code: 1 Command: prebuild-install || node-gyp rebuild --release Arguments: Directory: /www/wwwroot/strapi_neon/strapi_blog/node_modules/better-sqlite3 Output: prebuild-install warn install Request timed out gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | linux | x64 gyp info find Python using Python version 3.9.19 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v20.16.0/node-v20.16.0-headers.tar.gz
gyp http fetch GET https://nodejs.org/download/release/v20.16.0/node-v20.16.0-headers.tar.gz attempt 1 failed with ETIMEDOUT
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v20.16.0/node-v20.16.0-headers.tar.gz failed, reason:
gyp ERR! stack at ClientRequest.
On Linux node-gyp should download and extract files to /tmp. So unpacked it should look like
/tmp/prebuild/node/20.16.0/
├── include
└── installVersion
But regarding this, node-gyp would be a better place to ask.
I would rather try to deploy a prepacked bundle with the all required (native) modules instead of manually recreating an auto setup build environment.