anza-xyz / solana-pay

A new standard for decentralized payments.
https://solanapay.com
Apache License 2.0
1.28k stars 447 forks source link

Can't include in VueJS Project #98

Open DimitarDechew opened 2 years ago

DimitarDechew commented 2 years ago

Hey guys, Im trying to add Solana Pay in my VueJS project. I tried a lot of things, but whenever I install @solana/pay its giving this error:

* @solana/web3.js in ./node_modules/@solana/buffer-layout-utils/lib/esm/web3.mjs, ./node_modules/@solana/pay/lib/esm/constants.mjs

To install it, you can run: npm install --save @solana/web3.js

@solana/web3.js is installed I tried running it without @solana/pay and it works really good, same with @solana/spl-token, but when I install Solana Pay, @solana/spl-token also gives an error that web3.js cannot be found. I'm pretty sure that's a problem with the library. I also tried removing yarn cache, yarn.lock and reinstalling all packages.

package.json before @solana/pay installation:

{
  "name": "luxnode",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build"
  },
  "dependencies": {
    "@mdi/font": "^6.5.95",
    "@solana/spl-token": "^0.2.0",
    "@solana/web3.js": "^1.36.0",
    "axios": "^0.26.0",
    "core-js": "^3.6.5",
    "sass": "^1.49.8",
    "sass-loader": "10",
    "vue": "^2.6.11",
    "vue-router": "3.5",
    "vuescroll": "^4.17.3",
    "vuetify": "^2.4.0",
    "vuex": "^3.4.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.15",
    "@vue/cli-plugin-router": "~4.5.15",
    "@vue/cli-plugin-vuex": "~4.5.15",
    "@vue/cli-service": "~4.5.15",
    "sass": "~1.32.0",
    "sass-loader": "^10.0.0",
    "vue-cli-plugin-vuetify": "~2.4.5",
    "vue-template-compiler": "^2.6.11",
    "vuetify-loader": "^1.7.0"
  }
}
jordaaash commented 1 year ago

It sounds like maybe this is a result of https://github.com/solana-labs/solana-pay/issues/149