Closed Drjacky closed 2 years ago
And when I run npm install -S webpack
=>
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated safe-event-emitter@1.0.1: Renamed to @metamask/safe-event-emitter
npm WARN deprecated eth-sig-util@1.4.2: Deprecated in favor of '@metamask/eth-sig-util'
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated ethereumjs-tx@1.3.7: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated ethereumjs-vm@2.6.0: New package name format for new versions: @ethereumjs/vm. Please update.
npm WARN deprecated axios@0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated ethereumjs-block@1.7.1: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated ethereumjs-common@1.5.2: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated ethereumjs-block@2.2.2: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated uuid@3.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated ethereumjs-tx@2.1.2: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated bignumber.js@6.0.0: Custom ALPHABET bug fixed in v7.0.2
npm WARN deprecated core-js@1.2.7: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/Cellar/node/17.3.0/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/drjacky/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated fsevents@1.2.9: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! npm WARN deprecated safe-event-emitter@1.0.1: Renamed to @metamask/safe-event-emitter
npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated eth-sig-util@1.4.2: Deprecated in favor of '@metamask/eth-sig-util'
npm ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated uuid@3.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm ERR! npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated ethereumjs-tx@1.3.7: New package name format for new versions: @ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-block@2.2.0: New package name format for new versions: @ethereumjs/block. Please update.
npm ERR! npm WARN deprecated bignumber.js@6.0.0: Custom ALPHABET bug fixed in v7.0.2
npm ERR! npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated chokidar@2.1.6: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! npm WARN deprecated ethereumjs-vm@2.6.0: New package name format for new versions: @ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! npm WARN deprecated axios@0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm ERR! npm WARN deprecated ethereumjs-block@1.7.1: New package name format for new versions: @ethereumjs/block. Please update.
npm ERR! npm WARN deprecated buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm ERR! npm WARN deprecated ethereumjs-common@1.3.1: New package name format for new versions: @ethereumjs/common. Please update.
npm ERR! npm WARN deprecated core-js@2.6.9: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/drjacky/.npm/_cacache/tmp/git-clonepmbU35/node_modules/sha3
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node-gyp rebuild
npm ERR! npm ERR! CXX(target) Release/obj.target/sha3/src/addon.o
npm ERR! npm ERR! gyp info it worked if it ends with ok
npm ERR! npm ERR! gyp info using node-gyp@8.4.1
npm ERR! npm ERR! gyp info using node@17.3.0 | darwin | x64
npm ERR! npm ERR! gyp info find Python using Python version 3.9.9 found at "/usr/local/opt/python@3.9/bin/python3.9"
npm ERR! npm ERR! gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
npm ERR! npm ERR! gyp info spawn args [
npm ERR! npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! npm ERR! gyp info spawn args '-f',
npm ERR! npm ERR! gyp info spawn args 'make',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/Users/drjacky/.npm/_cacache/tmp/git-clonepmbU35/node_modules/sha3/build/config.gypi',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/Users/drjacky/Library/Caches/node-gyp/17.3.0/include/node/common.gypi',
npm ERR! npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/drjacky/Library/Caches/node-gyp/17.3.0',
npm ERR! npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/drjacky/Library/Caches/node-gyp/17.3.0/<(target_arch)/node.lib',
npm ERR! npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/drjacky/.npm/_cacache/tmp/git-clonepmbU35/node_modules/sha3',
npm ERR! npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! npm ERR! gyp info spawn args '--depth=.',
npm ERR! npm ERR! gyp info spawn args '--no-parallel',
npm ERR! npm ERR! gyp info spawn args '--generator-output',
npm ERR! npm ERR! gyp info spawn args 'build',
npm ERR! npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! npm ERR! gyp info spawn args ]
npm ERR! npm ERR! gyp info spawn make
npm ERR! npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! npm ERR! In file included from ../src/addon.cpp:4:
npm ERR! npm ERR! In file included from ../node_modules/nan/nan.h:2818:
npm ERR! npm ERR! ../node_modules/nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer'
npm ERR! npm ERR! data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
npm ERR! npm ERR! ~~~~~~~~^
npm ERR! npm ERR! In file included from ../src/addon.cpp:9:
npm ERR! npm ERR! In file included from ../src/KeccakNISTInterface.h:17:
npm ERR! npm ERR! ../src/KeccakSponge.h:23:9: warning: 'ALIGN' macro redefined [-Wmacro-redefined]
npm ERR! npm ERR! #define ALIGN __attribute__ ((aligned(32)))
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/i386/param.h:85:9: note: previous definition is here
npm ERR! npm ERR! #define ALIGN(p) __DARWIN_ALIGN(p)
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/addon.cpp:28:2: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
npm ERR! npm ERR! ~SHA3Hash()
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/addon.cpp:28:2: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
npm ERR! npm ERR! ../src/addon.cpp:49:10: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.14 or newer
npm ERR! npm ERR! obj = new SHA3Hash();
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/addon.cpp:49:10: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
npm ERR! npm ERR! ../src/addon.cpp:69:36: warning: 'CreationContext' is deprecated: Use MaybeLocal<Context> GetCreationContext() [-Wdeprecated-declarations]
npm ERR! npm ERR! Local<Context> context = target->CreationContext();
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/drjacky/Library/Caches/node-gyp/17.3.0/include/node/v8-object.h:597:3: note: 'CreationContext' has been explicitly marked deprecated here
npm ERR! npm ERR! V8_DEPRECATE_SOON("Use MaybeLocal<Context> GetCreationContext()")
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/drjacky/Library/Caches/node-gyp/17.3.0/include/node/v8config.h:462:39: note: expanded from macro 'V8_DEPRECATE_SOON'
npm ERR! npm ERR! # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/addon.cpp:83:11: error: no matching member function for call to 'Set'
npm ERR! npm ERR! target->Set(className, f);
npm ERR! npm ERR! ~~~~~~~~^~~
npm ERR! npm ERR! /Users/drjacky/Library/Caches/node-gyp/17.3.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/drjacky/Library/Caches/node-gyp/17.3.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! npm ERR! ^
npm ERR! npm ERR! 2 warnings and 4 errors generated.
npm ERR! npm ERR! make: *** [Release/obj.target/sha3/src/addon.o] Error 1
npm ERR! npm ERR! gyp ERR! build error
npm ERR! npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! npm ERR! gyp ERR! cwd /Users/drjacky/.npm/_cacache/tmp/git-clonepmbU35/node_modules/sha3
npm ERR! npm ERR! gyp ERR! node -v v17.3.0
npm ERR! npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! npm ERR! gyp ERR! not ok
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/drjacky/.npm/_logs/2021-12-31T16_02_07_333Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/drjacky/.npm/_logs/2021-12-31T16_01_12_552Z-debug-0.log
I had to downgrade to npm@14:
brew install node@14
-> brew unlink node
-> brew link node@14
Then, had to install webpack: npm install -S webpack
-> npm install -S webpack-cli
Then, npm install node-polyfill-webpack-plugin
Now, I get this:
opensea-mass-listing git:(main) ✗ npm run build-opensea-js
> opensea-masslist@0.0.1 build-opensea-js /Users/drjacky/Toolz/NFT/opensea-mass-listing
> webpack
assets by status 456 bytes [cached] 1 asset
runtime modules 396 bytes 2 modules
./webpack/seaport.ts 64 bytes [built] [code generated]
ERROR in ./webpack/seaport.ts 1:0-38
Module not found: Error: Can't resolve 'opensea-js' in '/Users/drjacky/Toolz/NFT/opensea-mass-listing/webpack'
resolve 'opensea-js' in '/Users/drjacky/Toolz/NFT/opensea-mass-listing/webpack'
Parsed request is a module
using description file: /Users/drjacky/Toolz/NFT/opensea-mass-listing/package.json (relative path: ./webpack)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/Users/drjacky/Toolz/NFT/opensea-mass-listing/webpack/node_modules doesn't exist or is not a directory
looking for modules in /Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules
single file module
using description file: /Users/drjacky/Toolz/NFT/opensea-mass-listing/package.json (relative path: ./node_modules/opensea-js)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/opensea-js doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/opensea-js.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/opensea-js.js doesn't exist
/Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/opensea-js doesn't exist
/Users/drjacky/Toolz/NFT/node_modules doesn't exist or is not a directory
/Users/drjacky/Toolz/node_modules doesn't exist or is not a directory
/Users/drjacky/node_modules doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
webpack 5.65.0 compiled with 1 error in 265 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opensea-masslist@0.0.1 build-opensea-js: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opensea-masslist@0.0.1 build-opensea-js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/drjacky/.npm/_logs/2021-12-31T16_51_31_474Z-debug.log
Then, I had to run npm i opensea-js
-> npm i core-js
But then:
➜ opensea-mass-listing git:(main) ✗ npm run build-opensea-js
> opensea-masslist@0.0.1 build-opensea-js /Users/drjacky/Toolz/NFT/opensea-mass-listing
> webpack
internal/modules/cjs/loader.js:1102
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/drjacky/Toolz/NFT/opensea-mass-listing/webpack.config.js
require() of ES modules is not supported.
require() of /Users/drjacky/Toolz/NFT/opensea-mass-listing/webpack.config.js from /Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/webpack/bin/convert-argv.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename webpack.config.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/drjacky/Toolz/NFT/opensea-mass-listing/package.json.
at new NodeError (internal/errors.js:322:7)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at requireConfig (/Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/webpack/bin/convert-argv.js:97:18)
at /Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/webpack/bin/convert-argv.js:104:17
at Array.forEach (<anonymous>)
at module.exports (/Users/drjacky/Toolz/NFT/opensea-mass-listing/node_modules/webpack/bin/convert-argv.js:102:15) {
code: 'ERR_REQUIRE_ESM'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opensea-masslist@0.0.1 build-opensea-js: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opensea-masslist@0.0.1 build-opensea-js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/drjacky/.npm/_logs/2021-12-31T20_07_17_446Z-debug.log
🎉 Solution: I removed the folder and cloned it again. Then:
npm install -g npm-check-updates
ncu -u
npm install
So, it installs the latest requirements versions.
npm run build-opensea-js
=>sh: webpack: command not found
npm run build
=>sh: svelte-kit: command not found