VueJS2 与 Solana Pay
我正在使用 VueJS 构建一个应用程序,我想将支付处理器与 SolanaPay 集成。我无法安装 SolanaPay 软件包,因为当我尝试导入它时,它给了我这个错误。
ERROR Failed to compile with 3 errors 16:41:22 ч.
These dependencies were not found:
* @solana/web3.js in ./node_modules/@solana/buffer-layout-utils/lib/esm/web3.mjs, ./node_modules/@solana/pay/lib/esm/constants.mjs
我很确定这是 Vue/Webpack 问题,因为当我尝试安装这些包时 - @solana/web3.js
& @solana/pay
在纯 Javascript 项目上他们可以工作。我还尝试从 vue-cli-service
中删除 @
别名,但它不起作用。
package.json
{
"name": "test_project",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@solana/pay": "^0.1.3",
"@solana/web3.js": "^1.36.0",
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuetify": "^2.6.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.15",
"@vue/cli-plugin-eslint": "~4.5.15",
"@vue/cli-plugin-router": "~4.5.15",
"@vue/cli-service": "~4.5.15",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"sass": "~1.32.0",
"sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.4.7",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
I'm building an application with VueJS and I want to integrate payment processor with SolanaPay. I got nowhere with the installation of the SolanaPay package, because when I try to import it it's giving me this error.
ERROR Failed to compile with 3 errors 16:41:22 ч.
These dependencies were not found:
* @solana/web3.js in ./node_modules/@solana/buffer-layout-utils/lib/esm/web3.mjs, ./node_modules/@solana/pay/lib/esm/constants.mjs
I am pretty sure that's Vue/Webpack
problem, because when I try to install these packages - @solana/web3.js
& @solana/pay
on plain Javascript project they work. I also tried removing the @
alias from vue-cli-service
but it didn't work.
package.json
{
"name": "test_project",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@solana/pay": "^0.1.3",
"@solana/web3.js": "^1.36.0",
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuetify": "^2.6.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.15",
"@vue/cli-plugin-eslint": "~4.5.15",
"@vue/cli-plugin-router": "~4.5.15",
"@vue/cli-service": "~4.5.15",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"sass": "~1.32.0",
"sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.4.7",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于我的软件包版本
@solana/[email protected]
但是当我安装@solana/
[电子邮件受保护]
它已修复。The problem was with package versions I had
@solana/[email protected]
but when I installed@solana/[email protected]
it got fixed.