Open Abrar-talpur opened 2 years ago
I downloaded the folder and tried to generate the nfts which are already in the layers but still getting module not found error.
@Abrar-talpur run npm install
to install the dependencies.
@Abrar-talpur did you get a solution to your issue, iam facing the same problems.
@pmcrypto11023 can you paste your error please.
Hi folks, good new i was able to get the solution and the error is gone. What i did was - revert to the same version of node (14.17.6) Hashlips is using in the videos---this resolved my Canvas package not found issues (full pages and more ) of errors. To revert to node 14.17.6--i installed nvm (youtube) and then did the Git Bash steps (youtube) - giving admin authorization to overcome the Access Denied error. ...thank you.
This is an issue no matter what node
version you are using. Please fix.
@pzehle can you paste the error please.
Please fix.
It's not an issue with this repo. It's usually mis/not reading instructions.
npm ERR! code 1
npm ERR! path /Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! 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/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.6
npm ERR! node-pre-gyp info using node@16.14.0 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/pzehle/Sites/Crypto/hashlips_art_engine/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-v93-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-v93-darwin-unknown-arm64.tar.gz
npm ERR! 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)
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-v93-darwin-unknown-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.8.9 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
npm ERR! gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/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/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/pzehle/Library/Caches/node-gyp/16.14.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/pzehle/Library/Caches/node-gyp/16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/pzehle/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/pzehle/Sites/Crypto/hashlips_art_engine/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 pixman-1 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `pixman-1.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'pixman-1' found
npm ERR! gyp: Call to 'pkg-config pixman-1 --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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! 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/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
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 '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.4.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/pzehle/Sites/Crypto/hashlips_art_engine/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v16.14.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.6
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/pzehle/.npm/_logs/2022-05-16T21_52_25_483Z-debug-0.log
It's not an issue with this repo. It's usually mis/not reading instructions.
It is in fact an issue with the repository, as the instructions are fairly simple. Download repo, npm install
, then you are good to go.
After running npm install
- I get the error pasted above. It is not even able to install the dependencies...
@pzehle the error says it can't find pixman-1
:
Package pixman-1 was not found in the pkg-config search path.
Searching for the error comes up with this stackOverflow answer which suggests running brew install pkg-config cairo pango libpng jpeg giflib librsvg
if you have homebrew.
Tried and failed. Also went back to node 14 instead of 16, still the same.
Can we now say this is a problem with the repository?
@pzehle
If you're on an M1 mac, this answer suggests running arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg
.
If that doesn't help, one of canvas' maintainers suggested making sure you have ignore-scripts
off (npm config set ignore-scripts false
).
If it's still not working could you paste the output of npm install --verbose
please.
Can we now say this is a problem with the repository?
No, if anything, it's an issue with node-canvas because that's what depends on pixman-1
(and because I'm stubborn).
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine> npm install npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. (C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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! command "C:\Program Files\nodejs\node.exe" "C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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.6
npm ERR! node-pre-gyp ERR! not ok
npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm ERR! code 1 npm ERR! path C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Warning: Missing input files: npm ERR! C:\GTK\bin\libpangoft2-1.0-0.dll npm ERR! C:\GTK\bin\libexpat-1.dll npm ERR! C:\GTK\bin\libgmodule-2.0-0.dll npm ERR! C:\GTK\bin\zlib1.dll npm ERR! C:\GTK\bin\libgthread-2.0-0.dll npm ERR! C:\GTK\bin\libpango-1.0-0.dll npm ERR! C:\GTK\bin\libpangocairo-1.0-0.dll npm ERR! C:\GTK\bin\libpangowin32-1.0-0.dll npm ERR! C:\GTK\bin\libfreetype-6.dll npm ERR! C:\GTK\bin\libpng14-14.dll npm ERR! C:\GTK\bin\libglib-2.0-0.dll npm ERR! C:\GTK\bin\libcairo-2.dll npm ERR! C:\GTK\bin\libfontconfig-1.dll npm ERR! C:\GTK\bin\libgobject-2.0-0.dll npm ERR! C:\GTK\bin\libintl-8.dll npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. npm ERR! Backend.cc npm ERR! C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\src\backend\Backend.h(3,10): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory [C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\build\canvas.vcxproj] npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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 node-pre-gyp@1.0.6 npm ERR! node-pre-gyp info using node@18.0.0 | win32 | x64 npm ERR! node-pre-gyp info check checked for "C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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-win32-unknown-x64.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-win32-unknown-x64.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@18.0.0 (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-win32-unknown-x64.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@18.0.0 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@18.0.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Python310\python.exe" npm ERR! gyp info find VS using VS2022 (17.1.32407.343) found at: npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Python310\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Program Files\nodejs\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 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\DeLL\AppData\Local\node-gyp\Cache\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=C:\Users\DeLL\AppData\Local\node-gyp\Cache\18.0.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\DeLL\\AppData\\Local\\node-gyp\\Cache\\18.0.0\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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 'C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@18.0.0 | win32 | x64 npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) 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 Windows_NT 10.0.19044 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\build\Release\canvas.node" "--module_name=canvas" "--module_path=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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 C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine\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.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\DeLL\AppData\Local\npm-cache_logs\2022-05-05T23_52_01_563Z-debug-0.log PS C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine> node index.js node:internal/modules/cjs/loader:942 throw err; ^
Error: Cannot find module 'C:\Users\DeLL\OneDrive\Desktop\hashlips_art_engine/node_modules/sha1' Require stack:
Node.js v18.0.0