polkadot-developers / substrate-docs

Substrate Developer Hub. Substrate is powered by best in class cryptographic research and comes with peer to peer networking, consensus mechanisms, and much more.
https://docs.substrate.io
BSD Zero Clause License
130 stars 274 forks source link

Install Deps Error on Ubuntu Server TLS 22.04 #1292

Open halohsu opened 2 years ago

halohsu commented 2 years ago

Is there an existing issue?

Experiencing problems? Have you tried our Stack Exchange first?

Bug report for compiling, code snippets, templates, etc.

root@ubuntu:/data/app/substrate-docs# rm -rf node_modules/
root@ubuntu:/data/app/substrate-docs# yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "gatsby > eslint-config-react-app@6.0.0" has unmet peer dependency "babel-eslint@^10.0.0".
warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > graphql-type-json@0.3.2" has unmet peer dependency "graphql@>=0.8.0".
warning "gatsby > eslint-plugin-graphql > graphql-config > @endemolshinegroup/cosmiconfig-typescript-loader > ts-node@9.1.1" has unmet peer dependency "typescript@>=2.7".
warning " > gatsby-plugin-eslint@2.0.8" has incorrect peer dependency "eslint@^6.6.0".
warning " > gatsby-plugin-eslint@2.0.8" has incorrect peer dependency "eslint-loader@^3.0.2".
warning " > gatsby-plugin-image@1.14.2" has unmet peer dependency "@babel/core@^7.12.3".
warning "gatsby-plugin-sass > sass-loader@10.2.1" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
warning " > gatsby-remark-embed-snippet@7.17.0" has incorrect peer dependency "gatsby@^4.0.0-next".
warning " > gatsby-remark-embed-snippet@7.17.0" has incorrect peer dependency "gatsby-remark-prismjs@^4.0.0-next".
warning " > gatsby-transformer-gitinfo@1.1.0" has incorrect peer dependency "gatsby@^2.0.15".
warning " > react-lottie@1.2.3" has incorrect peer dependency "react@^0.14.7 || ^15.0.0 || ^16.0.0".
warning " > rehype-react@7.1.1" has unmet peer dependency "@types/react@>=17".
warning " > @babel/cli@7.17.10" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > eslint-loader@4.0.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "gatsby-plugin-postcss > postcss-loader@4.3.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[4/4] Building fresh packages...
[-/9] ⠄ waiting...
[7/9] ⠄ node-sass
[-/9] ⠄ waiting...
[-/9] ⠄ waiting...
error /data/app/substrate-docs/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /data/app/substrate-docs/node_modules/node-sass
Output:
Building: /root/.nvm/versions/node/v16.16.0/bin/node /data/app/substrate-docs/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/root/.nvm/versions/node/v16.16.0/bin/node',
gyp verb cli   '/data/app/substrate-docs/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@16.16.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.18
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 16.16.0
gyp verb command install [ '16.16.0' ]
gyp verb install input version string "16.16.0"
gyp verb install installing version: 16.16.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.16.0
gyp verb build dir attempting to create "build" dir: /data/app/substrate-docs/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /data/app/substrate-docs/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /data/app/substrate-docs/node_modules/node-sass/build/config.gypi
(node:84891) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp verb config.gypi checking for gypi file: /data/app/substrate-docs/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /data/app/substrate-docs/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args   '/data/app/substrate-docs/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/data/app/substrate-docs/node_modules/node-sass/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/data/app/substrate-docs/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/16.16.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/16.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/data/app/substrate-docs/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.node-gyp/16.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/data/app/substrate-docs/node_modules/node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /root/.node-gyp/16.16.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/data/app/substrate-docs/node_modules/node-sass/build'
  g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/root/.node-gyp/16.16.0/include/node -I/root/.node-gyp/16.16.0/src -I/root/.node-gyp/16.16.0/deps/openssl/config -I/root/.node-gyp/16.16.0/deps/openssl/openssl/include -I/root/.node-gyp/16.16.0/deps/uv/include -I/root/.node-gyp/16.16.0/deps/zlib -I/root/.node-gyp/16.16.0/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
In file included from ../src/libsass/src/ast.cpp:2:
../src/libsass/src/ast.hpp: In member function ‘virtual size_t Sass::Number::hash()’:
../src/libsass/src/ast.hpp:1614:25: warning: loop variable ‘numerator’ creates a copy from type ‘const std::__cxx11::basic_string<char>’ [-Wrange-loop-construct]
 1614 |         for (const auto numerator : numerators)
      |                         ^~~~~~~~~
../src/libsass/src/ast.hpp:1614:25: note: use reference type to prevent copying
 1614 |         for (const auto numerator : numerators)
      |                         ^~~~~~~~~
      |                         &

...

../src/binding.cpp: At global scope:
/root/.node-gyp/16.16.0/include/node/node.h:847:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  847 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/16.16.0/include/node/node.h:881:3: note: in expansion of macro ‘NODE_MODULE_X’
  881 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
  358 | NODE_MODULE(binding, RegisterModule);
      | ^~~~~~~~~~~
make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/data/app/substrate-docs/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/data/app/substrate-docs/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.15.0-41-generic
gyp ERR! command "/root/.nvm/versions/node/v16.16.0/bin/node" "/data/app/substrate-docs/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /data/app/substrate-docs/node_modules/node-sass
gyp ERR! node -v v16.16.0

root@ubuntu:/data/app/substrate-docs#

Steps to reproduce the problem

Envs

Steps

su - root
cd /data/app
git clone https://github.com/substrate-developer-hub/substrate-docs.git
cd substrate-docs
yarn
halohsu commented 2 years ago

GitHub can't comment on more content. Too many C/C++ compiler errors are not displayed.

lisa-parity commented 2 years ago

I'm not quite sure what you are trying to do here.