npm install failed on Mac OS - npm

Could someone help me check what caused this problem?
I want to generate NFT profile pictures using HashLips/Generative-art-node.
OS: Mac OS
NodeJs: v16.14.0
npm: 8.3.1
Editer: VS code
here is the log:
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
1 info using npm#8.3.1
2 info using node#v16.14.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/zanke/Downloads/generative-art-node-main/.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/Users/zanke/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 6ms
19 timing npm:load:configload Completed in 6ms
20 timing npm:load:setTitle Completed in 5ms
21 timing config:load:flatten Completed in 1ms
22 timing npm:load:display Completed in 2ms
23 verbose logfile /Users/zanke/.npm/_logs/2022-03-03T08_09_10_540Z-debug-0.log
24 timing npm:load:logFile Completed in 2ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 15ms
28 timing arborist:ctor Completed in 0ms
29 silly logfile start cleaning logs, removing 2 files
30 timing idealTree:init Completed in 20ms
31 timing idealTree:userRequests Completed in 0ms
32 silly idealTree buildDeps
33 timing idealTree:#root Completed in 0ms
34 timing idealTree:buildDeps Completed in 1ms
35 timing idealTree:fixDepFlags Completed in 0ms
36 timing idealTree Completed in 21ms
37 timing reify:loadTrees Completed in 25ms
38 timing reify:diffTrees Completed in 1ms
39 silly reify moves {}
40 timing reify:retireShallow Completed in 0ms
41 timing reify:createSparse Completed in 4ms
42 timing reify:loadBundles Completed in 0ms
43 silly audit bulk request {
43 silly audit '#mapbox/node-pre-gyp': [ '1.0.5' ],
43 silly audit abbrev: [ '1.1.1' ],
43 silly audit 'agent-base': [ '6.0.2' ],
43 silly audit 'ansi-regex': [ '2.1.1' ],
43 silly audit aproba: [ '1.2.0' ],
43 silly audit 'are-we-there-yet': [ '1.1.5' ],
43 silly audit 'balanced-match': [ '1.0.2' ],
43 silly audit 'brace-expansion': [ '1.1.11' ],
43 silly audit canvas: [ '2.8.0' ],
43 silly audit chownr: [ '2.0.0' ],
43 silly audit 'code-point-at': [ '1.1.0' ],
43 silly audit 'concat-map': [ '0.0.1' ],
43 silly audit 'console-control-strings': [ '1.1.0' ],
43 silly audit 'core-util-is': [ '1.0.2' ],
43 silly audit debug: [ '4.3.2' ],
43 silly audit 'decompress-response': [ '4.2.1' ],
43 silly audit delegates: [ '1.0.0' ],
43 silly audit 'detect-libc': [ '1.0.3' ],
43 silly audit 'fs-minipass': [ '2.1.0' ],
43 silly audit 'fs.realpath': [ '1.0.0' ],
43 silly audit gauge: [ '2.7.4' ],
43 silly audit glob: [ '7.1.7' ],
43 silly audit 'has-unicode': [ '2.0.1' ],
43 silly audit 'https-proxy-agent': [ '5.0.0' ],
43 silly audit inflight: [ '1.0.6' ],
43 silly audit inherits: [ '2.0.4' ],
43 silly audit 'is-fullwidth-code-point': [ '1.0.0' ],
43 silly audit isarray: [ '1.0.0' ],
43 silly audit 'lru-cache': [ '6.0.0' ],
43 silly audit 'make-dir': [ '3.1.0' ],
43 silly audit semver: [ '6.3.0', '7.3.5' ],
43 silly audit 'mimic-response': [ '2.1.0' ],
43 silly audit minimatch: [ '3.0.4' ],
43 silly audit minipass: [ '3.1.3' ],
43 silly audit minizlib: [ '2.1.2' ],
43 silly audit mkdirp: [ '1.0.4' ],
43 silly audit ms: [ '2.1.2' ],
43 silly audit nan: [ '2.15.0' ],
43 silly audit 'node-fetch': [ '2.6.1' ],
43 silly audit nopt: [ '5.0.0' ],
43 silly audit npmlog: [ '4.1.2' ],
43 silly audit 'number-is-nan': [ '1.0.1' ],
43 silly audit 'object-assign': [ '4.1.1' ],
43 silly audit once: [ '1.4.0' ],
43 silly audit 'path-is-absolute': [ '1.0.1' ],
43 silly audit 'process-nextick-args': [ '2.0.1' ],
43 silly audit 'readable-stream': [ '2.3.7' ],
43 silly audit rimraf: [ '3.0.2' ],
43 silly audit 'safe-buffer': [ '5.1.2' ],
43 silly audit 'set-blocking': [ '2.0.0' ],
43 silly audit 'signal-exit': [ '3.0.3' ],
43 silly audit 'simple-concat': [ '1.0.1' ],
43 silly audit 'simple-get': [ '3.1.0' ],
43 silly audit string_decoder: [ '1.1.1' ],
43 silly audit 'string-width': [ '1.0.2' ],
43 silly audit 'strip-ansi': [ '3.0.1' ],
43 silly audit tar: [ '6.1.11' ],
43 silly audit 'util-deprecate': [ '1.0.2' ],
43 silly audit 'wide-align': [ '1.1.3' ],
43 silly audit wrappy: [ '1.0.2' ],
43 silly audit yallist: [ '4.0.0' ]
43 silly audit }
44 timing reifyNode:node_modules/wrappy Completed in 68ms
45 timing reifyNode:node_modules/string-width Completed in 69ms
46 timing reifyNode:node_modules/strip-ansi Completed in 69ms
47 timing reifyNode:node_modules/wide-align Completed in 69ms
48 timing reifyNode:node_modules/simple-get Completed in 70ms
49 timing reifyNode:node_modules/path-is-absolute Completed in 69ms
50 timing reifyNode:node_modules/process-nextick-args Completed in 69ms
51 timing reifyNode:node_modules/number-is-nan Completed in 69ms
52 timing reifyNode:node_modules/object-assign Completed in 69ms
53 timing reifyNode:node_modules/once Completed in 69ms
54 timing reifyNode:node_modules/ms Completed in 69ms
55 timing reifyNode:node_modules/inflight Completed in 70ms
56 timing reifyNode:node_modules/is-fullwidth-code-point Completed in 70ms
57 timing reifyNode:node_modules/has-unicode Completed in 70ms
58 timing reifyNode:node_modules/chownr Completed in 70ms
59 timing reifyNode:node_modules/code-point-at Completed in 70ms
60 timing reifyNode:node_modules/ansi-regex Completed in 70ms
61 timing reifyNode:node_modules/abbrev Completed in 70ms
62 timing reifyNode:node_modules/brace-expansion Completed in 71ms
63 timing reifyNode:node_modules/aproba Completed in 71ms
64 timing reifyNode:node_modules/set-blocking Completed in 72ms
65 timing reifyNode:node_modules/minipass Completed in 71ms
66 timing reifyNode:node_modules/mimic-response Completed in 71ms
67 timing reifyNode:node_modules/make-dir Completed in 71ms
68 timing reifyNode:node_modules/lru-cache Completed in 71ms
69 timing reifyNode:node_modules/inherits Completed in 71ms
70 timing reifyNode:node_modules/decompress-response Completed in 71ms
71 timing reifyNode:node_modules/console-control-strings Completed in 72ms
72 timing reifyNode:node_modules/fs-minipass Completed in 72ms
73 timing reifyNode:node_modules/signal-exit Completed in 73ms
74 timing reifyNode:node_modules/yallist Completed in 73ms
75 timing reifyNode:node_modules/util-deprecate Completed in 73ms
76 timing reifyNode:node_modules/fs.realpath Completed in 72ms
77 timing reifyNode:node_modules/minimatch Completed in 72ms
78 timing reifyNode:node_modules/balanced-match Completed in 73ms
79 timing reifyNode:node_modules/safe-buffer Completed in 74ms
80 timing reifyNode:node_modules/string_decoder Completed in 74ms
81 timing reifyNode:node_modules/npmlog Completed in 73ms
82 timing reifyNode:node_modules/minizlib Completed in 73ms
83 timing reifyNode:node_modules/simple-concat Completed in 75ms
84 timing reifyNode:node_modules/rimraf Completed in 75ms
85 timing reifyNode:node_modules/isarray Completed in 74ms
86 timing reifyNode:node_modules/core-util-is Completed in 75ms
87 timing reifyNode:node_modules/concat-map Completed in 75ms
88 timing reifyNode:node_modules/debug Completed in 75ms
89 timing reifyNode:node_modules/delegates Completed in 75ms
90 timing reifyNode:node_modules/nopt Completed in 75ms
91 timing reifyNode:node_modules/detect-libc Completed in 76ms
92 timing reifyNode:node_modules/are-we-there-yet Completed in 76ms
93 timing reifyNode:node_modules/glob Completed in 77ms
94 timing reifyNode:node_modules/mkdirp Completed in 78ms
95 timing reifyNode:node_modules/make-dir/node_modules/semver Completed in 78ms
96 timing reifyNode:node_modules/https-proxy-agent Completed in 79ms
97 timing reifyNode:node_modules/agent-base Completed in 79ms
98 timing reifyNode:node_modules/node-fetch Completed in 81ms
99 timing reifyNode:node_modules/gauge Completed in 81ms
100 timing reifyNode:node_modules/readable-stream Completed in 86ms
101 timing reifyNode:node_modules/tar Completed in 88ms
102 timing reifyNode:node_modules/#mapbox/node-pre-gyp Completed in 89ms
103 timing reifyNode:node_modules/semver Completed in 91ms
104 timing reifyNode:node_modules/nan Completed in 93ms
105 timing reifyNode:node_modules/canvas Completed in 93ms
106 timing reify:unpack Completed in 94ms
107 timing reify:unretire Completed in 1ms
108 timing build:queue Completed in 2ms
109 timing build:link:node_modules/detect-libc Completed in 2ms
110 timing build:link:node_modules/mkdirp Completed in 2ms
111 timing build:link:node_modules/rimraf Completed in 2ms
112 timing build:link:node_modules/#mapbox/node-pre-gyp Completed in 2ms
113 timing build:link:node_modules/make-dir/node_modules/semver Completed in 1ms
114 timing build:link:node_modules/semver Completed in 1ms
115 timing build:link:node_modules/nopt Completed in 2ms
116 timing build:link Completed in 2ms
117 info run canvas#2.8.0 install node_modules/canvas node-pre-gyp install --fallback-to-build
118 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 1150ms
119 timing auditReport:getReport Completed in 1152ms
120 silly audit report {
120 silly audit report 'simple-get': [
120 silly audit report {
120 silly audit report id: 1006931,
120 silly audit report url: 'https://github.com/advisories/GHSA-wpg7-2c88-r8xv',
120 silly audit report title: 'Exposure of Sensitive Information in simple-get',
120 silly audit report severity: 'high',
120 silly audit report vulnerable_versions: '>=3.0.0 <3.1.1'
120 silly audit report }
120 silly audit report ],
120 silly audit report 'node-fetch': [
120 silly audit report {
120 silly audit report id: 1006899,
120 silly audit report url: 'https://github.com/advisories/GHSA-r683-j2x4-v87g',
120 silly audit report title: 'node-fetch is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor',
120 silly audit report severity: 'high',
120 silly audit report vulnerable_versions: '<2.6.7'
120 silly audit report }
120 silly audit report ]
120 silly audit report }
121 timing metavuln:cache:get:security-advisory:simple-get:CfOTKibitQPLcCOtoiNMjQWiTsIdTxBIEgmmzGfYOefAN673X9eKBphpxXZ188QSF3cfnwnc9CgLPJQnthm+aQ== Completed in 4ms
122 timing metavuln:cache:get:security-advisory:node-fetch:uaZ3UpetgMoaSFDS6DtQK9+5KXhDQHg9nxPjdRKLpQbF/XdpCvGUNsQpackRFbF2Kj8o/EnjD2og3Lza4bG1eQ== Completed in 4ms
123 http fetch GET 200 https://registry.npmjs.org/simple-get 284ms (cache revalidated)
124 timing metavuln:packument:simple-get Completed in 285ms
125 timing metavuln:load:security-advisory:simple-get:1006931 Completed in 1ms
126 timing metavuln:calculate:security-advisory:simple-get:1006931 Completed in 287ms
127 http fetch GET 200 https://registry.npmjs.org/node-fetch 787ms (cache revalidated)
128 timing metavuln:packument:node-fetch Completed in 790ms
129 timing metavuln:load:security-advisory:node-fetch:1006899 Completed in 2ms
130 timing metavuln:calculate:security-advisory:node-fetch:1006899 Completed in 792ms
131 timing metavuln:cache:get:security-advisory:canvas:vIE4EEvmO28bpJrSEZwrAnyUCVYUn67z6kGn1rgpe+XSS4hs9OWmLS8LIHS7T390ppW7ifiDpy5AT8wwhjPyaA== Completed in 3ms
132 http fetch GET 200 https://registry.npmjs.org/canvas 260ms (cache revalidated)
133 timing metavuln:packument:canvas Completed in 262ms
134 timing metavuln:load:security-advisory:canvas:CfOTKibitQPLcCOtoiNMjQWiTsIdTxBIEgmmzGfYOefAN673X9eKBphpxXZ188QSF3cfnwnc9CgLPJQnthm+aQ== Completed in 1ms
135 timing metavuln:calculate:security-advisory:canvas:CfOTKibitQPLcCOtoiNMjQWiTsIdTxBIEgmmzGfYOefAN673X9eKBphpxXZ188QSF3cfnwnc9CgLPJQnthm+aQ== Completed in 264ms
136 timing metavuln:cache:get:security-advisory:#mapbox/node-pre-gyp:1muVjrCRJhBXDmS0XOk1EPdyjTIUf23qc8/X38z+vDX2yzWRczdDWmpuftGoGK7RxGgzW2yiu6vGNDbuP+2Ixw== Completed in 3ms
137 http fetch GET 200 https://registry.npmjs.org/#mapbox%2fnode-pre-gyp 280ms (cache revalidated)
138 timing metavuln:packument:#mapbox/node-pre-gyp Completed in 282ms
139 timing metavuln:load:security-advisory:#mapbox/node-pre-gyp:uaZ3UpetgMoaSFDS6DtQK9+5KXhDQHg9nxPjdRKLpQbF/XdpCvGUNsQpackRFbF2Kj8o/EnjD2og3Lza4bG1eQ== Completed in 0ms
140 timing metavuln:calculate:security-advisory:#mapbox/node-pre-gyp:uaZ3UpetgMoaSFDS6DtQK9+5KXhDQHg9nxPjdRKLpQbF/XdpCvGUNsQpackRFbF2Kj8o/EnjD2og3Lza4bG1eQ== Completed in 282ms
141 timing auditReport:init Completed in 1341ms
142 timing reify:audit Completed in 2493ms
143 info run canvas#2.8.0 install { code: 1, signal: null }
144 timing reify:rollback:createSparse Completed in 34ms
145 timing reify:rollback:retireShallow Completed in 0ms
146 timing command:install Completed in 15715ms
147 verbose stack Error: command failed
147 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
147 verbose stack at ChildProcess.emit (node:events:520:28)
147 verbose stack at maybeClose (node:internal/child_process:1092:16)
147 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
148 verbose pkgid canvas#2.8.0
149 verbose cwd /Users/zanke/Downloads/generative-art-node-main
150 verbose Darwin 21.2.0
151 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
152 verbose node v16.14.0
153 verbose npm v8.3.1
154 error code 1
155 error path /Users/zanke/Downloads/generative-art-node-main/node_modules/canvas
156 error command failed
157 error command sh -c node-pre-gyp install --fallback-to-build
158 error Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
159 error node-pre-gyp info it worked if it ends with ok
159 error node-pre-gyp info using node-pre-gyp#1.0.5
159 error node-pre-gyp info using node#16.14.0 | darwin | arm64
159 error node-pre-gyp info check checked for "/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release/canvas.node" (not found)
159 error node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-darwin-unknown-arm64.tar.gz
159 error 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-v93-darwin-unknown-arm64.tar.gz
159 error node-pre-gyp WARN Pre-built binaries not installable for canvas#2.8.0 and node#16.14.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
159 error 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-v93-darwin-unknown-arm64.tar.gz
159 error gyp info it worked if it ends with ok
159 error gyp info using node-gyp#8.4.1
159 error gyp info using node#16.14.0 | darwin | arm64
159 error gyp info ok
159 error gyp info it worked if it ends with ok
159 error gyp info using node-gyp#8.4.1
159 error gyp info using node#16.14.0 | darwin | arm64
159 error gyp info find Python using Python version 3.9.10 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
159 error gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
159 error gyp info spawn args [
159 error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
159 error gyp info spawn args 'binding.gyp',
159 error gyp info spawn args '-f',
159 error gyp info spawn args 'make',
159 error gyp info spawn args '-I',
159 error gyp info spawn args '/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/config.gypi',
159 error gyp info spawn args '-I',
159 error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
159 error gyp info spawn args '-I',
159 error gyp info spawn args '/Users/zanke/Library/Caches/node-gyp/16.14.0/include/node/common.gypi',
159 error gyp info spawn args '-Dlibrary=shared_library',
159 error gyp info spawn args '-Dvisibility=default',
159 error gyp info spawn args '-Dnode_root_dir=/Users/zanke/Library/Caches/node-gyp/16.14.0',
159 error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
159 error gyp info spawn args '-Dnode_lib_file=/Users/zanke/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
159 error gyp info spawn args '-Dmodule_root_dir=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas',
159 error gyp info spawn args '-Dnode_engine=v8',
159 error gyp info spawn args '--depth=.',
159 error gyp info spawn args '--no-parallel',
159 error gyp info spawn args '--generator-output',
159 error gyp info spawn args 'build',
159 error gyp info spawn args '-Goutput_dir=.'
159 error gyp info spawn args ]
159 error /bin/sh: pkg-config: command not found
159 error gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
159 error gyp ERR! configure error
159 error gyp ERR! stack Error: `gyp` failed with exit code: 1
159 error gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
159 error gyp ERR! stack at ChildProcess.emit (node:events:520:28)
159 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
159 error gyp ERR! System Darwin 21.2.0
159 error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
159 error gyp ERR! cwd /Users/zanke/Downloads/generative-art-node-main/node_modules/canvas
159 error gyp ERR! node -v v16.14.0
159 error gyp ERR! node-gyp -v v8.4.1
159 error gyp ERR! not ok
159 error node-pre-gyp ERR! build error
159 error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/zanke/Downloads/generative-art-node-main/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
159 error node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/zanke/Downloads/generative-art-node-main/node_modules/#mapbox/node-pre-gyp/lib/util/compile.js:89:23)
159 error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:520:28)
159 error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
159 error node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
159 error node-pre-gyp ERR! System Darwin 21.2.0
159 error node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/zanke/Downloads/generative-art-node-main/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
159 error node-pre-gyp ERR! cwd /Users/zanke/Downloads/generative-art-node-main/node_modules/canvas
159 error node-pre-gyp ERR! node -v v16.14.0
159 error node-pre-gyp ERR! node-pre-gyp -v v1.0.5
159 error node-pre-gyp ERR! not ok
160 verbose exit 1
161 timing npm Completed in 15809ms
162 verbose unfinished npm timer reify 1646294950633
163 verbose unfinished npm timer reify:build 1646294950764
164 verbose unfinished npm timer build 1646294950764
165 verbose unfinished npm timer build:deps 1646294950764
166 verbose unfinished npm timer build:run:install 1646294950768
167 verbose unfinished npm timer build:run:install:node_modules/canvas 1646294950768
168 verbose code 1
169 error A complete log of this run can be found in:
169 error /Users/zanke/.npm/_logs/2022-03-03T08_09_10_540Z-debug-0.log
Not sure what's going wrong. Any given advices will be super appreciated.
.....
.....
.....
.....
.....
.....
.....

I solved this by replacing "node-sass" to "sass" in package.json. Of course, set correct version.
node-sass was declared deprecated on Oct 2020.

Related

npm ERR! code ENOENT. Does not create a new package.json or install dependencies

I wanted to start a new package.json with npm init -y from the windows cmd and the console throws an error.
I tried to solve it this way and it didn't work.
Remove the npm cache with npm cache clean --force.
Update to the latest version of npm
Install the latest version of LTS node.
Uninstall and install node and it didn't work.
C:\Users\ADMIN\Documents\server>npm init -y
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\ADMIN\Documents\server\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\ADMIN\Documents\server\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ADMIN\AppData\Local\npm-cache\_logs\2023-01-12T00_47_42_486Z-debug-0.log
The npm cache error log
> 0 verbose cli C:\Program Files\nodejs\node.exe
> C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js 1
> info using npm#9.2.0 2 info using node#v18.13.0 3 timing
> npm:load:whichnode Completed in 0ms 4 timing config:load:defaults
> Completed in 2ms 5 timing
> config:load:file:C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\npmrc
> Completed in 3ms 6 timing config:load:builtin Completed in 3ms 7
> timing config:load:cli Completed in 2ms 8 timing config:load:env
> Completed in 0ms 9 timing config:load:project Completed in 3ms 10
> timing config:load:file:C:\Users\ADMIN\.npmrc Completed in 1ms 11
> timing config:load:user Completed in 1ms 12 timing
> config:load:file:C:\Users\ADMIN\AppData\Roaming\npm\etc\npmrc
> Completed in 0ms 13 timing config:load:global Completed in 1ms 14
> timing config:load:setEnvs Completed in 1ms 15 timing config:load
> Completed in 14ms 16 timing npm:load:configload Completed in 14ms 17
> timing npm:load:mkdirpcache Completed in 0ms 18 timing
> npm:load:mkdirplogs Completed in 0ms 19 verbose title npm doctor 20
> verbose argv "doctor" 21 timing npm:load:setTitle Completed in 2ms 22
> timing config:load:flatten Completed in 3ms 23 timing npm:load:display
> Completed in 4ms 24 verbose logfile logs-max:10
> dir:C:\Users\ADMIN\AppData\Local\npm-cache\_logs\2023-01-12T00_58_05_674Z-
> 25 verbose logfile
> C:\Users\ADMIN\AppData\Local\npm-cache\_logs\2023-01-12T00_58_05_674Z-debug-0.log
> 26 timing npm:load:logFile Completed in 15ms 27 timing npm:load:timers
> Completed in 0ms 28 timing npm:load:configScope Completed in 0ms 29
> timing npm:load Completed in 37ms 30 silly logfile done cleaning log
> files 31 timing config:load:flatten Completed in 1ms 32 info Running
> checkup 33 http fetch GET 200
> https://registry.npmjs.org/-/ping?write=true 453ms (cache miss) 34
> http fetch GET 200 https://registry.npmjs.org/npm 261ms (cache miss)
> 35 timing command:doctor Completed in 4395ms 36 verbose exit 0 37
> timing npm Completed in 4460ms 38 info ok
I applied the solutions that I mentioned and none of them solved the error. Does anyone know how I could solve it? Since I have not found any method to solve it

npm ERR! Cannot read properties of undefined (reading 'stdin')

I have an error when running vue.js 3 with vite
I added nodejs into Variable Environments before
I have tried these things but not working
using npm cache clear & npm cache clear --force but still error and receive npm WARN using --force Recommended protections disabled.
deleted node_modules folder and package.lock.json and run npm install
re-clone my repo on Github
re-installed Nodejs, VSCode, vite.js, update to latest npm
Debug log:
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'run',
0 verbose cli 'dev'
0 verbose cli ]
1 info using npm#8.1.2
2 info using node#v17.1.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\Admin\Desktop\xfago-cms-vue\.npmrc Completed in 0ms
10 timing config:load:project Completed in 0ms
11 timing config:load:file:C:\Users\Admin\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\Admin\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 timing npm:load:configload Completed in 7ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 2ms
23 timing npm:load:cleanupLog Completed in 1ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 12ms
27 timing command:run-script Completed in 7ms
28 verbose stack TypeError: Cannot read properties of undefined (reading 'stdin')
28 verbose stack at promiseSpawnUid (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:70:18)
28 verbose stack at promiseSpawn (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:15:10)
28 verbose stack at runScriptPkg (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\lib\run-script-pkg.js:54:13)
28 verbose stack at runScript (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\lib\run-script.js:9:16)
28 verbose stack at RunScript.run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:129:13)
29 verbose cwd C:\Users\Admin\Desktop\xfago-cms-vue
30 verbose Windows_NT 10.0.19043
31 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
32 verbose node v17.1.0
33 verbose npm v8.1.2
34 error Cannot read properties of undefined (reading 'stdin')
35 verbose exit 1```
The solution was to run the command npm init to create a "complete" package.json file.
same issue found to me beacuse i used
npm config --global set x = "Y"
so this is the huge mistake i did for that i need to unintall nodejs
and also delete C:/Users/"username"/Appdata/Roming/ delete npm from here as well,
again install it, it worked for me
i know this is not a solution but issue is according to me have only this solution.

How can I execute Vue-3-playground on my laptop?

I am very new to the Vue ecosystem, and am trying to learn.
I have downloaded the Vue-3 playground onto my mac by cloning the git repository:
git clone https://github.com/vuesomedev/vue-3-playground.git
on my Macbook pro, OS11.4, Big Sur From the vue-3-playground folder, I execute:
npm install
followed by
npm run serve
This last command produces the error:
npm ERR! missing script: serve
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/erlebach/.npm/_logs/2021-06-21T18_30_41_455Z-debug.log
Here is the end of the log:
0 verbose cli [
0 verbose cli '/Users/erlebach/Documents/global_npm_installs/lib/node_modules/node/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'run',
0 verbose cli 'serve'
0 verbose cli ]
1 info using npm#7.5.3
2 info using node#v16.3.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/erlebach/src/2021/vue-3-playground/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/erlebach/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/Users/erlebach/Documents/global_npm_installs/etc/npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 7ms
19 verbose npm-session c834a8418ac090c8
20 timing npm:load Completed in 33ms
21 timing command:run-script Completed in 2ms
22 verbose stack Error: missing script: serve
22 verbose stack at runScript (/usr/local/lib/node_modules/npm/lib/run-script.js:54:11)
23 verbose cwd /Users/erlebach/src/2021/vue-3-playground
24 verbose Darwin 20.5.0
25 verbose argv "/Users/erlebach/Documents/global_npm_installs/lib/node_modules/node/bin/node" "/usr/local/bin/npm" "run" "serve"
26 verbose node v16.3.0
27 verbose npm v7.5.3
28 error missing script: serve
29 verbose exit 1
Any insight is greatly appreciated. Thank you.

Command 'npm run dev' failed NuxtJS

I get the following error when I try to run my dev server. I am very new to Vue/Nuxt
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js',
0 verbose cli 'run',
0 verbose cli 'dev'
0 verbose cli ]
1 info using npm#7.6.3
2 info using node#v15.12.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
Completed in 2ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:D:\Projects\TCG\IGG\iggbouwkostenkompas\.npmrc
Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:C:\Users\ghoeksema\.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\ghoeksema\AppData\Roaming\npm\etc\npmrc
Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 verbose npm-session 46dffbc867d5c2db
20 timing npm:load Completed in 14ms
21 timing command:run Completed in 694ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess.<anonymous> (C:\Program
Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
22 verbose stack at ChildProcess.emit (node:events:369:20)
22 verbose stack at maybeClose (node:internal/child_process:1067:16)
22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
23 verbose pkgid bouwkosten-index#1.0.0
24 verbose cwd D:\Projects\TCG\IGG\iggbouwkostenkompas
25 verbose Windows_NT 10.0.19041
26 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
27 verbose node v15.12.0
28 verbose npm v7.6.3
29 error code 1
30 error path D:\Projects\TCG\IGG\iggbouwkostenkompas
31 error command failed
32 error command C:\Windows\system32\cmd.exe /d /s /c nuxt
33 verbose exit 1
I have no idea how fix it and have done some searches but none of the solutions worked for me. Clearing cache also didn't work
Thanks in advance

run-ios and run-android commands failed

Few days ago all was fine and run smoothly.
Today I can’t try my project iOS and Android.
npx react-native run-ios
npx react-native run-android
both commands failed to compile.
I tried to remove node_modules folder, npm install and cd ios pod install
Cleaned the cache and checked if npm package is up to date.
All with no success.
Any help is appreciated and thank you.
Here is the log I get after the failed run-ios command:
0 verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli 'exec',
0 verbose cli '--',
0 verbose cli 'react-native',
0 verbose cli 'run-ios'
0 verbose cli ]
1 info using npm#7.5.2
2 info using node#v14.15.4
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/aitassouabdelkader/Downloads/_clever-programmer/_projects/_react_projects/_mes_projets/socialMedia/.npmrc Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/aitassouabdelkader/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 9ms
19 verbose npm-session f851aed9bb473f1b
20 timing npm:load Completed in 18ms
21 timing command:exec Completed in 15519ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
22 verbose stack at ChildProcess.emit (events.js:315:20)
22 verbose stack at maybeClose (internal/child_process.js:1048:16)
22 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
23 verbose pkgid socialMedia#0.0.1
24 verbose cwd /Users/aitassouabdelkader/Downloads/_clever-programmer/_projects/_react_projects/_mes_projets/socialMedia
25 verbose Darwin 20.3.0
26 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "react-native" "run-ios"
27 verbose node v14.15.4
28 verbose npm v7.5.2
29 error code 1
30 error path /Users/aitassouabdelkader/Downloads/_clever-programmer/_projects/_react_projects/_mes_projets/socialMedia
31 error command failed
32 error command sh -c react-native "run-ios"
33 verbose exit 1