Open Alp31sj opened 2 years ago
nvm use 16.3.18
nvm use 16.3.18
What is nvm?
nvm is a node version manager enables you to change the node version you are using.
nvm use 16.3.18
what do you suggest if zsh: command not found: nvm ?
Try to change your node version to v16.13.1
having the same issue no one has really posted a solution
install nvm 16.3.18 and then switch nvm version to 16.3.18
nvm install 16.3.18
nvm list
all the version will be listed below choose 16.3.18 and you are good to go
As it says in the error, you're missing node_modules/sha1
Try
npm install sha1
Hope this helps :)
The issue is that you are using wrong version of node.
TO EVERYONE FACING A PROBLEM WITH NPM INSTALL NPM RUN GENERATE
I HAVE FOUND A FIX for MAC USERS M1!
1- Open terminal and type:
nvm --version
if you don't have nvm then you must install it with:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
it is vital that you RESTART TERMINAL after this step.
2- Open terminal again and run:
nvm install v16.13.0
3- re-download the source code from this github and open it in Visual Studio Code, do not open the past folder you had because most likely you have the modules installed already, just redownload and open a new folder.
4- in Visual Studio Code, press New Terminal
5- Run this code:
nvm use v16.13.0
then If you don't have homebrew installed then install it with this command: (it can take 15 mins to install homebrew).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and then you must install the packages by running:
eval $(/opt/homebrew/bin/brew shellenv)
brew install pkg-config cairo pango libpng jpeg giflib librsvg
if you have the packages already installed then use:
eval $(/opt/homebrew/bin/brew shellenv)
brew reinstall pkg-config cairo pango libpng jpeg giflib librsvg
now Run:
brew yarn install
then
yarn install
then
npm i
then
npm generate run
Everything should work now! If you have any error still, I am happy to help! It took me 5 hours to figure it out but I finally did.
Run this command line in the project folder npm update
The issue is that you are using wrong version of node.
TO EVERYONE FACING A PROBLEM WITH NPM INSTALL NPM RUN GENERATE
I HAVE FOUND A FIX for MAC USERS M1!
1- Open terminal and type:
nvm --version
if you don't have nvm then you must install it with:curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
it is vital that you RESTART TERMINAL after this step.
2- Open terminal again and run:
nvm install v16.13.0
3- re-download the source code from this github and open it in Visual Studio Code, do not open the past folder you had because most likely you have the modules installed already, just redownload and open a new folder.
4- in Visual Studio Code, press New Terminal
5- Run this code:
nvm use v16.13.0
then If you don't have homebrew installed then install it with this command: (it can take 15 mins to install homebrew).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and then you must install the packages by running:eval $(/opt/homebrew/bin/brew shellenv)
brew install pkg-config cairo pango libpng jpeg giflib librsvg
if you have the packages already installed then use:
eval $(/opt/homebrew/bin/brew shellenv)
brew reinstall pkg-config cairo pango libpng jpeg giflib librsvg
now Run:
brew yarn install
thenyarn install
thennpm i
thennpm generate run
Everything should work now! If you have any error still, I am happy to help! It took me 5 hours to figure it out but I finally did.
thank you bro it works for me
The issue is that you are using wrong version of node.
TO EVERYONE FACING A PROBLEM WITH NPM INSTALL NPM RUN GENERATE
I HAVE FOUND A FIX for MAC USERS M1! 1- Open terminal and type:
nvm --version
if you don't have nvm then you must install it with:curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
it is vital that you RESTART TERMINAL after this step. 2- Open terminal again and run: > >nvm install v16.13.0
3- re-download the source code from this github and open it in Visual Studio Code, do not open the past folder you had because most likely you have the modules installed already, just redownload and open a new folder. 4- in Visual Studio Code, press New Terminal 5- Run this code:nvm use v16.13.0
then If you don't have homebrew installed then install it with this command: (it can take 15 mins to install homebrew).> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
> and then you must install the packages by running: >eval $(/opt/homebrew/bin/brew shellenv)
>brew install pkg-config cairo pango libpng jpeg giflib librsvg
if you have the packages already installed then use:eval $(/opt/homebrew/bin/brew shellenv)
brew reinstall pkg-config cairo pango libpng jpeg giflib librsvg
now Run:brew yarn install
thenyarn install
thennpm i
thennpm generate run
Everything should work now! If you have any error still, I am happy to help! It took me 5 hours to figure it out but I finally did.thank you bro it works for me
I did everything step by step, but still I get the same error. come on, what I can do!!! The weird thing is, around 2months ago, everything works fine for me. btw, I'm using the M1 apple chip.
@Olive-l can you paste your error please.
node:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module '/Users/joe/hashlips_art_engine-main/node_modules/sha1' Require stack:
This is my error message...
@Olive-l you need to run npm install
.
@Olive-l you need to run
npm install
.
I tried but no luck.
@Olive-l can you paste your error again please.
it seems the errors occur when 'npm install' command. okay, i am out, i used another intel core mbp, it works well.
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. 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 /Users/olive/hashlips_art_engine-main/node_modules/canvas npm ERR! command failed
@Olive-l that's not the full error.
@Olive-l that's not the full error.
joe@page hashlips_art_engine-main % 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.
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 /Users/joe/hashlips_art_engine-main/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/joe/.nvm/versions/node/v16.13.1/bin/node /Users/joe/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/joe/hashlips_art_engine-main/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/joe/hashlips_art_engine-main/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.13.1 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/joe/hashlips_art_engine-main/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.13.1 (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.3.0
npm ERR! gyp info using node@16.13.1 | 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.3.0
npm ERR! gyp info using node@16.13.1 | 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 WARN EACCES current user ("joe") does not have permission to access the dev dir "/Users/joe/Library/Caches/node-gyp/16.13.1"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/folders/09/6ptkts789f5xlg00zgvxgr0000gp/T/.node-gyp"
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 '/Users/joe/.nvm/versions/node/v16.13.1/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/joe/hashlips_art_engine-main/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/joe/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/var/folders/09/6ptkts789f5xlg00zgvxgr0000gp/T/.node-gyp/16.13.1/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=/var/folders/09/6ptkts789f5xlg00zgvxgr0000gp/T/.node-gyp/16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/joe/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/var/folders/09/6ptkts789f5xlg00zgvxgr0000gp/T/.node-gyp/16.13.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/joe/hashlips_art_engine-main/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 (/Users/joe/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/Users/joe/.nvm/versions/node/v16.13.1/bin/node" "/Users/joe/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/joe/hashlips_art_engine-main/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/joe/hashlips_art_engine-main/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/joe/hashlips_art_engine-main/node_modules/canvas
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.3.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/joe/.nvm/versions/node/v16.13.1/bin/node /Users/joe/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/joe/hashlips_art_engine-main/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/joe/hashlips_art_engine-main/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.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/joe/.npm/_logs/2022-08-09T07_09_36_026Z-debug.log
@Olive-l this is because one of our dependencies doesn't support m1, please look at some existing issues for help.
@Olive-l this is because one of our dependencies doesn't support m1, please look at some existing issues for help.
Finally, I resolved it, this really takes me some times.
1) open the terminal by using the Rosetta, relaunch the terminal, make sure the arch is i386; 2) downgrade the node to 14.17.3 (I'm not sure this is necessary); 3) go to the root of Hashlips folder; 4) run "npm install"; 5) run "npm run generate";
It works for me now.
I’m keep getting this error it was working until I added my own layers the layers all match the ones in my config.js file
@BtcTap4138 can you paste the error here please.
@BtcTap4138 try using my fork, I fixed that a while ago.
A simple npm update
worked for me. But I'm not a M1 user. Using an Intel chip and Windows.
npm update funciona en windows
Make sure that before running npm i - you update npm with the command npm update. This should work
`node:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module 'C:\Users\yegen\Desktop\hashlips_art_engine-1.1.2_patch_v1/node_modules/sha1' Require stack:
Node.js v17.3.0`
when i run the program it gives this error i updated my node version i deleted and restored the files but i get the same error