Open YuchengHappy opened 2 years ago
I don't know why this happened to me, I run the npm install canvas few times, but the bug keeps happening to me.
@YuchengHappy It's a problem with M1 macs, I think you can get around it by downgrading node to v14 and running npm i
again.
@YuchengHappy It's a problem with M1 macs, I think you can get around it by downgrading node to v14 and running
npm i
again.
I tried with my older mac, indeed, it was due to the M1 chips problem.
Downgrading to v14 node didn't fix it for me. Is there any workaround for M1 macs?
@kelvin-zhao what about 14.19.0?
@bolshoytoster 14.19.0 worked! Thank you~
@bolshoytoster 14.19.0 worked! Thank you~ Hello, im using Mac m1, downloaded 14.19.0 , npm 6.14.16. However, it still writes me " Error: Cannot find modules" thank you
@db-133 please paste the full error.
umal@MacBook-Pro-Umalt hashlips_art_engine-1.1.2_patch_v6 % npm run build
hashlips_art_engine@1.1.1 build /Users/umal/Desktop/hashlips_art_engine-1.1.2_patch_v6 node index.js
internal/modules/cjs/loader.js:905 throw err; ^
Error: Cannot find module '/Users/umal/Desktop/hashlips_art_engine-1.1.2_patch_v6/node_modules/sha1' Require stack:
node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashlips_art_engine@1.1.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! A complete log of this run can be found in: npm ERR! /Users/umal/.npm/_logs/2022-03-23T12_36_25_267Z-debug.log umal@MacBook-Pro-Umalt hashlips_art_engine-1.1.2_patch_v6 %
@db-133 run npm install
.
After I did this command, it says this v@mbp-umalt hashlips_art_engine-1.1.2_patch_v6 % npm install npm WARN hashlips_art_engine@1.1.1 No repository field.
audited 66 packages in 0.998s
6 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities"
@db-133 I think it worked.
after I do node index.js
(node:14987) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/Users/umal/Desktop/hashlips_art_engine-1.1.2_patch_v6/layers/Eyeball/'
at Object.readdirSync (fs.js:1047:3)
at getElements (/Users/umal/Desktop/hashlips_art_engine-1.1.2_patch_v6/src/main.js:73:6)
at /Users/umal/Desktop/hashlips_art_engine-1.1.2_patch_v6/src/main.js:92:15
at Array.map (node --trace-warnings ...
to show where the warning was created)
(node:14987) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14987) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@db-133 save your src/config.js
file.
Bro, thank you so much. it worked!
Hey please help am running into this problem when trying to compile my code code:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module '/root/folder/hh-fcc/ethers-simple-storage/...' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []
@Mkhuliseni what did you run to get that error?
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:101:18)
please help
@Arulthas05 can you please paste the FULL error here please.
Error: Cannot find module 'C:\Users\Ry\Documents\NEW\generative-art-opensource-main...' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
@R777R it looks like the path was shortened on the first line, so I'll assume it can't find index.js
. Try running cd generative-art-opensource-main
first.
npm run build
node:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module '../build/Release/canvas.node' Require stack:
Node.js v17.4.0 npm ERR! code 1 npm ERR! path /Users/luyucheng/Downloads/hashlips_art_engine-main npm ERR! command failed npm ERR! command sh -c node index.js
npm ERR! A complete log of this run can be found in: npm ERR! /Users/luyucheng/.npm/_logs/2022-02-22T00_51_42_118Z-debug.log