Skip to content

Unable to install v4 #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gitmalong opened this issue Feb 15, 2025 · 8 comments
Open

Unable to install v4 #65

gitmalong opened this issue Feb 15, 2025 · 8 comments

Comments

@gitmalong
Copy link

gitmalong commented Feb 15, 2025

npm install @minswap/sdk@latest

npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@jsr%2fspacebudz__lucid - Not found
npm error 404
npm error 404 '@jsr/spacebudz__lucid@^0.20.4' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /Users/user/.npm/_logs/2025-02-15T10_39_09_830Z-debug-0.log

Another error after I installed the jsr package manually

npm install prisma --save-dev
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@minswap/[email protected]',
npm warn EBADENGINE   required: { node: '>=20.17 <21' },
npm warn EBADENGINE   current: { node: 'v23.7.0', npm: '10.9.2' }
npm warn EBADENGINE }
npm error code 1
npm error path /Users/user/Code/cardano-butterbrot/node_modules/@minswap/sdk
npm error command failed
npm error command sh -c prisma generate
npm error Error: Could not load schema from `src/syncer/postgres/prisma/schema.prisma` provided by "prisma.schema" config of `package.json`: file or directory not found

package.json

{
  "type": "module",
  "dependencies": {
    "@blockfrost/blockfrost-js": "^6.0.0",
    "@minswap/sdk": "^0.4.0",
    "@spacebudz/lucid": "npm:@jsr/spacebudz__lucid@^0.20.5",
    "@sundaeswap/core": "^1.3.47",
    "cardano-wallet-js": "^1.4.0"
  },
  "devDependencies": {
    "@types/node": "^16.11.7",
    "ts-node": "^10.4.0",
    "typescript": "^5.7.3"
  },
  "scripts": {
    "build": "tsc",
    "start": "ts-node src/index.ts"
  },
  "main": "dist/index.js",
  "engines": {
    "node": "=23.7.0"
  }
}
@harryboiz
Copy link
Collaborator

Hi @gitmalong , Can you try to create file .npmrc, then add @jsr:registry=https://npm.jsr.io to your file .npmrc, then try to install again. It works for me

Image

@gitmalong
Copy link
Author

Hi @datnguyen2k3 ! This saves the first error but now I am getting:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@minswap/[email protected]',
npm warn EBADENGINE   required: { node: '>=20.17 <21' },
npm warn EBADENGINE   current: { node: 'v23.7.0', npm: '10.9.2' }
npm warn EBADENGINE }
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm error code 1
npm error path /Users/user/Code/cardano-butterbrot/node_modules/@minswap/sdk
npm error command failed
npm error command sh -c prisma generate
npm error Error: Could not load schema from `src/syncer/postgres/prisma/schema.prisma` provided by "prisma.schema" config of `package.json`: file or directory not found
npm error A complete log of this run can be found in: /Users/user/.npm/_logs/2025-02-17T20_02_40_045Z-debug-0.log

@harryboiz
Copy link
Collaborator

Hi @gitmalong, This show that has error required: { node: '>=20.17 <21' },, can you down your version of node to 20.17, then try install this sdk again

@Ishannaik
Copy link

Ishannaik commented Feb 18, 2025

Hi @gitmalong, This show that has error required: { node: '>=20.17 <21' },, can you down your version of node to 20.17, then try install this sdk again

Hi! Even after changing the node version and trying npm install @minswap/sdk

npm error code 1
npm error path /home/debian/Cardano/min/node_modules/@minswap/sdk
npm error command failed
npm error command sh -c prisma generate
npm error Error: Could not load schema from `src/syncer/postgres/prisma/schema.prisma` provided by "prisma.schema" config of `package.json`: file or directory not found
npm error A complete log of this run can be found in: /home/debian/.npm/_logs/2025-02-18T10_43_15_563Z-debug-0.log
 node -v
v20.17.0```

@harryboiz
Copy link
Collaborator

Hi @Ishannaik , can you try pnpm instead of npm

@Ishannaik
Copy link

Ishannaik commented Feb 18, 2025

Hi @Ishannaik , can you try pnpm instead of npm

Hi, I successfully installed it using pnpm but I'm facing another issue now

npx tsc
node_modules/.pnpm/@[email protected]/node_modules/@minswap/sdk/build/index.d.ts:6:25 - error TS2307: Cannot find module '@prisma/client' or its corresponding type declarations.

6 import * as Prisma from '@prisma/client';
                          ~~~~~~~~~~~~~~~~


Found 1 error in node_modules/.pnpm/@[email protected]/node_modules/@minswap/sdk/build/index.d.ts:6

I'm trying to build the typescript file but I face this error
I'm trying to use the exact file in the readme

Example 3: Build Order transaction and submit
Swap MIN-ADA in V2 pool on testnet:
With Meastro adapter:

Do you have discord? My username is [REDACTED]

@harryboiz
Copy link
Collaborator

Hi @Ishannaik, we recently release version 0.4.1, can you try to install it. Also I had chat you on discord

@Bachhsunkid
Copy link

v0.4.1 seems to have a build failure. My temporary solution is to add the flag --ignore-scripts.

npm install --ignore-scripts @minswap/sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants