MarkSackerberg / umi-cmv3-ui-inofficial

https://umi-cmv3-ui-inofficial.vercel.app
58 stars 65 forks source link

Repo doesn't run at windows and node.js >=20 #26

Closed fl0wm0ti0n closed 4 months ago

fl0wm0ti0n commented 6 months ago

Unfortunately this repo is not possible to run on windows with node.js v20 to v22. didn't try versions before 20.

I get a ton of Errors, and if i try to solve them i get new errors... i didnt get it to run. but if i use this repo on https://vercel.com/ it works. i uplaod the errors when i have time to reproduce it!

first i had a ton of dependency and depreciation errors, by solving these i get a alot of cjs and ems related errors,

solving that i get the actual errors:

PS C:\flowGit\crypto-projects\solana-hashlips-candy-nft\4-mint\candy-nft-mint-v3_1> pnpm build                                  
> umi-cmv3-ui-inofficial@0.3.0 build C:\flowGit\crypto-projects\solana-hashlips-candy-nft\4-mint\candy-nft-mint-v3_1
> next build

  ▲ Next.js 14.2.3
  - Environments: .env

./pages/index.tsx
111:6  Warning: React Hook useEffect has missing dependencies: 'candyMachineId', 'firstRun', 'setfirstRun', and 'toast'. Either 
include them or remove the dependency array. If 'setfirstRun' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules       
 ✓ Linting and checking validity of types    
   Creating an optimized production build ...
 ✓ Compiled successfully
   Collecting page data  ...(node:45420) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:45480) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.      
unhandledRejection Error: Cannot find package 'C:\flowGit\crypto-projects\solana-hashlips-candy-nft\4-mint\candy-nft-mint-v3_1\node_modules\.pnpm\@metaplex-foundation+umi-eddsa-web3js@0.9.1_@metaplex-foundation+umi@0.9.1_@solana+web3.js@1._5db4uirfevb4qsdrvmirrpmn6q\node_modules\@solana\web3.js\package.json' imported from C:\flowGit\crypto-projects\solana-hashlips-candy-nft\4-mint\candy-nft-mint-v3_1\node_modules\.pnpm\@metaplex-foundation+umi-eddsa-web3js@0.9.1_@metaplex-foundation+umi@0.9.1_@solana+web3.js@1._5db4uirfevb4qsdrvmirrpmn6q\node_modules\@metaplex-foundation\umi-eddsa-web3js\dist\esm\createWeb3JsEddsa.mjs
Did you mean to import "@solana/web3.js/lib/index.cjs.js"?
    at legacyMainResolve (node:internal/modules/esm/resolve:214:26)
    at packageResolve (node:internal/modules/esm/resolve:832:14)
    at moduleResolve (node:internal/modules/esm/resolve:918:18)
    at defaultResolve (node:internal/modules/esm/resolve:1148:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:528:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:497:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:231:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:97:39)
    at link (node:internal/modules/esm/module_job:96:36) {
  type: 'Error',
  code: 'ERR_MODULE_NOT_FOUND'
}
   Collecting page data  . ELIFECYCLE  Command failed with exit code 1.

Versions:

PS C:\flowGit\crypto-projects\solana-hashlips-candy-nft\4-mint\candy-nft-mint-v3_1> pnpm list
Legend: production dependency, optional only, dev only

umi-cmv3-ui-inofficial@0.3.0 C:\flowGit\crypto-projects\solana-hashlips-candy-nft\4-mint\candy-nft-mint-v3_1 (PRIVATE)

dependencies:
@chakra-ui/next-js 2.1.4                               @types/node 18.11.18
@chakra-ui/react 2.7.1                                 @types/react 18.0.27
@emotion/react 11.11.1                                 @types/react-dom 18.0.10
@emotion/styled 11.11.0                                @types/react-slick 0.23.10
@metaplex-foundation/mpl-candy-machine 6.0.1           @wallet-standard/base 1.0.1
@metaplex-foundation/mpl-token-metadata 3.2.0          @wallet-standard/features 1.0.3
@metaplex-foundation/mpl-toolbox 0.9.2                 bs58 4.0.1
@metaplex-foundation/umi 0.9.1                         eslint 8.33.0
@metaplex-foundation/umi-bundle-defaults 0.9.1         eslint-config-next 13.1.6
@metaplex-foundation/umi-rpc-web3js 0.9.1              eventemitter3 5.0.1
@metaplex-foundation/umi-signer-wallet-adapters 0.9.1  framer-motion 10.12.16
@metaplex-foundation/umi-uploader-nft-storage 0.9.1    next 14.2.3
@metaplex-foundation/umi-web3js-adapters 0.9.1         react 18.2.0
@solana/wallet-adapter-base 0.9.23                     react-dom 18.2.0
@solana/wallet-adapter-react 0.15.32                   react-remove-scroll 2.5.9
@solana/wallet-adapter-react-ui 0.9.31                 react-slick 0.29.0
@solana/wallet-adapter-wallets 0.19.16                 typescript 4.9.5
@solana/web3.js 1.91.7

package: info i had to put in "type": "commonjs", cause the node.js didn't work with next.js and also in all "solana/wallet-adapter*" modules i had to work around that it uses cjs and not ems...

{
  "name": "umi-cmv3-ui-inofficial",
  "version": "0.3.0",
  "private": true,
  "type": "commonjs",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@chakra-ui/next-js": "^2.1.4",
    "@chakra-ui/react": "^2.7.1",
    "@emotion/react": "^11.11.1",
    "@emotion/styled": "^11.11.0",
    "@metaplex-foundation/mpl-candy-machine": "6.0.1",
    "@metaplex-foundation/mpl-token-metadata": "3.2.0",
    "@metaplex-foundation/mpl-toolbox": "^0.9.2",
    "@metaplex-foundation/umi": "^0.9.1",
    "@metaplex-foundation/umi-bundle-defaults": "^0.9.1",
    "@metaplex-foundation/umi-rpc-web3js": "^0.9.1",
    "@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.1",
    "@metaplex-foundation/umi-uploader-nft-storage": "^0.9.1",
    "@metaplex-foundation/umi-web3js-adapters": "^0.9.1",
    "@solana/wallet-adapter-base": "^0.9.23",
    "@solana/wallet-adapter-react": "^0.15.32",
    "@solana/wallet-adapter-react-ui": "^0.9.31",
    "@solana/wallet-adapter-wallets": "^0.19.16",
    "@solana/web3.js": "^1.91.7",
    "@types/node": "18.11.18",
    "@types/react": "18.0.27",
    "@types/react-dom": "18.0.10",
    "@types/react-slick": "^0.23.10",
    "@wallet-standard/base": "^1.0.1",
    "@wallet-standard/features": "^1.0.3",
    "bs58": "4.0.1",
    "eslint": "8.33.0",
    "eslint-config-next": "13.1.6",
    "eventemitter3": "^5.0.1",
    "framer-motion": "^10.12.16",
    "next": "^14.2.3",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-remove-scroll": "^2.5.9",
    "react-slick": "^0.29.0",
    "typescript": "4.9.5"
  },
  "pnpm": {
    "overrides": {
      "postcss@<8.4.31": ">=8.4.31",
      "next@>=0.9.9 <13.4.20-canary.13": ">=13.4.20-canary.13",
      "socket.io-parser@>=4.0.4 <4.2.3": ">=4.2.3",
      "word-wrap@<1.2.4": ">=1.2.4",
      "follow-redirects@<1.15.4": ">=1.15.4",
      "crypto-js@<4.2.0": ">=4.2.0",
      "semver@>=7.0.0 <7.5.2": ">=7.5.2",
      "semver@>=6.0.0 <6.3.1": ">=6.3.1",
      "axios@>=0.8.1 <0.28.0": ">=0.28.0",
      "ip@<1.1.9": ">=1.1.9",
      "browserify-sign@>=2.6.0 <=4.2.1": ">=4.2.2",
      "follow-redirects@<=1.15.5": ">=1.15.6",
      "protobufjs@>=6.10.0 <6.11.4": ">=6.11.4"
    }
  }
}
fl0wm0ti0n commented 6 months ago

just did a test with node.js v18, it worked