Closed moriartyjm closed 2 years ago
@jmontalvo94 the source for the documentation site can be found at
@masonlr I have been having a rough time trying to yarn the repo. Any suggestion on what may be happening? Maybe my node.js and yarn versions are the problem?
code/rangl/sites
❯ git clone git@gitlab.com:rangl/sites/docs.git
Cloning into 'docs'...
remote: Enumerating objects: 209, done.
remote: Counting objects: 100% (209/209), done.
remote: Compressing objects: 100% (144/144), done.
remote: Total 209 (delta 85), reused 163 (delta 56), pack-reused 0
Receiving objects: 100% (209/209), 7.57 MiB | 3.14 MiB/s, done.
Resolving deltas: 100% (85/85), done.
code/rangl/sites took 4s
❯ cd docs
docs on master via v17.0.0
❯ ll
total 472K
drwxr-xr-x 8 jorge jorge 4.0K Oct 21 00:55 .git/
-rw-r--r-- 1 jorge jorge 233 Oct 21 00:55 .gitignore
-rw-r--r-- 1 jorge jorge 721 Oct 21 00:55 README.md
drwxr-xr-x 2 jorge jorge 4.0K Oct 21 00:55 blog/
drwxr-xr-x 2 jorge jorge 4.0K Oct 21 00:55 docs/
-rw-r--r-- 1 jorge jorge 2.8K Oct 21 00:55 docusaurus.config.js
-rw-r--r-- 1 jorge jorge 764 Oct 21 00:55 package.json
-rw-r--r-- 1 jorge jorge 87 Oct 21 00:55 sidebars.js
drwxr-xr-x 4 jorge jorge 4.0K Oct 21 00:55 src/
drwxr-xr-x 3 jorge jorge 4.0K Oct 21 00:55 static/
-rw-r--r-- 1 jorge jorge 430K Oct 21 00:55 yarn.lock
docs on master via v17.0.0
❯ yarn --version
1.22.17
docs on master via v17.0.0
❯ node --version
v17.0.0
docs on master via v17.0.0
❯ yarn
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @docusaurus/plugin-ideal-image@2.0.0-alpha.39" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/plugin-ideal-image > @endiliey/lqip-loader@3.0.2" has unmet peer dependency "file-loader@*".
warning "@docusaurus/plugin-ideal-image > @endiliey/react-ideal-image@0.0.11" has unmet peer dependency "prop-types@>=15".
warning " > @docusaurus/preset-classic@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/plugin-content-blog@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/plugin-content-docs@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/plugin-content-pages@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/plugin-google-analytics@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/plugin-google-gtag@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/plugin-sitemap@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/theme-classic@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/theme-classic@2.0.0-alpha.54" has unmet peer dependency "webpack@^4.41.2".
warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia@2.0.0-alpha.54" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/theme-classic > react-toggle@4.1.1" has unmet peer dependency "prop-types@^15.3.0 || ^16.0.0".
[4/4] Building fresh packages...
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
error /home/jorge/code/rangl/sites/docs/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /home/jorge/code/rangl/sites/docs/node_modules/sharp
Output:
info sharp Using cached /home/jorge/.npm/_libvips/libvips-8.7.4-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=17.0.0 runtime=node arch=x64 libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@17.0.0 | linux | x64
gyp info find Python using Python version 3.7.9 found at "/home/jorge/miniconda3/bin/python3"
gyp info spawn /home/jorge/miniconda3/bin/python3
gyp info spawn args [
gyp info spawn args '/home/jorge/.nvm/versions/node/v17.0.0/lib/node_modules/npm/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 '/home/jorge/code/rangl/sites/docs/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/jorge/.nvm/versions/node/v17.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/jorge/.cache/node-gyp/17.0.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=/home/jorge/.cache/node-gyp/17.0.0',
gyp info spawn args '-Dnode_gyp_dir=/home/jorge/.nvm/versions/node/v17.0.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/jorge/.cache/node-gyp/17.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/jorge/code/rangl/sites/docs/node_modules/sharp',
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 info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/jorge/code/rangl/sites/docs/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
<command-line>: warning: "_GLIBCXX_USE_CXX11_ABI" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/jorge/.cache/node-gyp/17.0.0/include/node/v8-object.h:10,
from /home/jorge/.cache/node-gyp/17.0.0/include/node/v8-array-buffer.h:13,
from /home/jorge/.cache/node-gyp/17.0.0/include/node/v8.h:25,
from /home/jorge/.cache/node-gyp/17.0.0/include/node/node.h:63,
from ../src/common.cc:22:
/home/jorge/.cache/node-gyp/17.0.0/include/node/v8-persistent-handle.h:10:10: fatal error: v8-weak-callback-info.h: No such file or directory
10 | #include "v8-weak-callback-info.h" // NOLINT(build/include_directory)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [sharp.target.mk:140: Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/jorge/code/rangl/sites/docs/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/jorge/.nvm/versions/node/v17.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 4.19.104-microsoft-standard
gyp ERR! command "/home/jorge/.nvm/versions/node/v17.0.0/bin/node" "/home/jorge/.nvm/versions/node/v17.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/jorge/code/rangl/sites/docs/node_modules/sharp
@jmontalvo94 let's just start again here: https://github.com/rangl-labs/landing
I've based all of this on a more recent version of docusaurus. I can set up the netlify deploy to be from GitHub instead of GitLab.
https://practical-gates-41c557.netlify.app is now linked to the main
branch of https://github.com/rangl-labs/landing.
Worked like a breeze!
There is a problem with Node.js version 17.0.0 to start the local development server. It seems to be related to LTS, downgrading to version 16.12.0 (LTS starting next week) fixes the issue. See this stackoverflow issue on the topic.
Error stack:
landing on master via v17.0.0 took 1m15s
❯ yarn start
yarn run v1.22.17
$ docusaurus start
Starting the development server...
Docusaurus website is running at "http://localhost:3000/".
● Client █████████████████████████ setup (9%) compilation
FileUriPlugin
node:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at BulkUpdateDecorator.hashFactory (/home/jorge/code/rangl/landing/node_modules/webpack/lib/util/createHash.js:155:18)
at BulkUpdateDecorator.digest (/home/jorge/code/rangl/landing/node_modules/webpack/lib/util/createHash.js:80:21)
at /home/jorge/code/rangl/landing/node_modules/webpack/lib/DefinePlugin.js:595:38
at _next33 (eval at create (/home/jorge/code/rangl/landing/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:57:1)
at _next11 (eval at create (/home/jorge/code/rangl/landing/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:189:1)
at Hook.eval [as call] (eval at create (/home/jorge/code/rangl/landing/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:239:1)
at Hook.CALL_DELEGATE [as _call] (/home/jorge/code/rangl/landing/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/home/jorge/code/rangl/landing/node_modules/webpack/lib/Compiler.js:1053:26)
at /home/jorge/code/rangl/landing/node_modules/webpack/lib/Compiler.js:1097:29
at Hook.eval [as callAsync] (eval at create (/home/jorge/code/rangl/landing/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/jorge/code/rangl/landing/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/home/jorge/code/rangl/landing/node_modules/webpack/lib/Compiler.js:1092:28)
at /home/jorge/code/rangl/landing/node_modules/webpack/lib/Watching.js:200:19
at Hook.eval [as callAsync] (eval at create (/home/jorge/code/rangl/landing/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v17.0.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
landing on master via v17.0.0 took 5s
❯ nvm use 16
Now using node v16.12.0 (npm v8.1.0)
landing on master via v16.12.0
❯ yarn start
yarn run v1.22.17
$ docusaurus start
Starting the development server...
Docusaurus website is running at "http://localhost:3000/".
✔ Client
Compiled successfully in 1.09m
ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/jorge/code/rangl/landing
ℹ 「wds」: 404s will fallback to /index.html
Continuing this issue on this other repo