specs icon indicating copy to clipboard operation
specs copied to clipboard

Fix the deployment.

Open johnnymatthews opened this issue 2 years ago • 3 comments

This project isn't building. There's a huge output of errors from running npm install:

$ npm install

npm WARN deprecated @braintree/[email protected]: Potential XSS vulnerability patched in v6.0.0.
npm WARN deprecated [email protected]: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config
npm ERR! code 1
npm ERR! path /Users/johnny/Code/fvm-specs/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/Users/johnny/.nvm/versions/node/v18.0.0/bin/node /Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release/canvas.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v108-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v108-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v108-darwin-unknown-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/johnny/Code/fvm-specs/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/johnny/Library/Caches/node-gyp/18.0.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/johnny/Library/Caches/node-gyp/18.0.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/johnny/Library/Caches/node-gyp/18.0.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/johnny/Code/fvm-specs/node_modules/canvas',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Package pangocairo was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `pangocairo.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'pangocairo' found
npm ERR! gyp: Call to 'pkg-config pangocairo --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/Users/johnny/.nvm/versions/node/v18.0.0/bin/node" "/Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd /Users/johnny/Code/fvm-specs/node_modules/canvas
npm ERR! gyp ERR! node -v v18.0.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/johnny/.nvm/versions/node/v18.0.0/bin/node /Users/johnny/.nvm/versions/node/v18.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/johnny/Code/fvm-specs/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/johnny/Code/fvm-specs/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.5.0
npm ERR! node-pre-gyp ERR! command "/Users/johnny/.nvm/versions/node/v18.0.0/bin/node" "/Users/johnny/Code/fvm-specs/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/johnny/Code/fvm-specs/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v18.0.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/johnny/.npm/_logs/2022-06-13T15_20_16_973Z-debug-0.log

I'll have a dig around and see what's going wrong.

johnnymatthews avatar Jun 13 '22 15:06 johnnymatthews

This might be a reason why I can't building locally (taken from the node_canvas repo):

image

I think the easiest thing to do right now is the grab the content, and try and rebuild the site. It looks to be just using a simple Hugo theme, so hopefully it's not too tricky.

johnnymatthews avatar Jun 13 '22 15:06 johnnymatthews

NOTE: fixing this is going to be non-trivial. It looks like the code for embedding snippets from go files doesn't support type aliases, and supporting them correctly is likely going to be very painful (requires type resolution). The best interim solution I can think of is to pre-resolve the type and follow the alias, but that's going to break as we change upstream.

Stebalien avatar Jun 13 '22 15:06 Stebalien

Aaah, is it the snippets that are freaking out? That's annoying. One solution I had was to just port things to the https://github.com/alex-shpak/hugo-book theme (which is what this site is based off) and call it a day...

johnnymatthews avatar Jun 13 '22 16:06 johnnymatthews

This might be a reason why I can't building locally (taken from the node_canvas repo):

image

I think the easiest thing to do right now is the grab the content, and try and rebuild the site. It looks to be just using a simple Hugo theme, so hopefully it's not too tricky.

I get the same error when compiling on my Linux box, so it does not seem to be related to ARM

fridrik01 avatar Feb 15 '23 10:02 fridrik01

@johnnymatthews can you verify if you are still having this issue? I didn't run into this when I was fixing things, but I don't have an ARM mac so I can't tell if my updating of a bunch of outdated packages caught this bug or not.

ianconsolata avatar Jul 14 '23 16:07 ianconsolata

Everything looks fine now @ianconsolata! Nice job!

$ npm install

npm WARN deprecated [email protected]: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config

added 1022 packages, and audited 1023 packages in 54s

189 packages are looking for funding
  run `npm fund` for details

20 vulnerabilities (6 moderate, 14 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

specs on  master is 📦 v2.1.1 via  v19.8.1 took 54s

Closing.

johnnymatthews avatar Jul 17 '23 21:07 johnnymatthews