This crashs everytime when we import ipfs package from vue code
See original GitHub issueI’m using this package: yarn add ipfs-http-client
And if I import it from vue3, then I run yarn watch
, I got errors
https://github.com/ipfs/js-ipfs/issues/3858#issuecomment-1046617510
yarn run v1.22.17
$ node scripts/watch.js
Pre-bundling dependencies:
vue
element-plus
ipfs-http-client
(this will be run only when your dependencies or config have changed)
✘ [ERROR] No matching export in "browser-external:url" for import "parse"
node_modules/electron-fetch/lib/index.es.js:1:9:
1 │ import { parse, format, resolve } from 'url';
╵ ~~~~~
✘ [ERROR] No matching export in "browser-external:url" for import "format"
node_modules/electron-fetch/lib/index.es.js:1:16:
1 │ import { parse, format, resolve } from 'url';
╵ ~~~~~~
✘ [ERROR] No matching export in "browser-external:url" for import "resolve"
node_modules/electron-fetch/lib/index.es.js:1:24:
1 │ import { parse, format, resolve } from 'url';
╵ ~~~~~~~
✘ [ERROR] No matching export in "browser-external:http" for import "STATUS_CODES"
node_modules/electron-fetch/lib/index.es.js:3:9:
3 │ import { STATUS_CODES } from 'http';
╵ ~~~~~~~~~~~~
✘ [ERROR] No matching export in "browser-external:stream" for import "PassThrough"
node_modules/electron-fetch/lib/index.es.js:6:17:
6 │ import Stream, { PassThrough } from 'stream';
╵ ~~~~~~~~~~~
Error: Build failed with 5 errors:
node_modules/electron-fetch/lib/index.es.js:1:9: ERROR: No matching export in "browser-external:url" for import "parse"
node_modules/electron-fetch/lib/index.es.js:1:16: ERROR: No matching export in "browser-external:url" for import "format"
node_modules/electron-fetch/lib/index.es.js:1:24: ERROR: No matching export in "browser-external:url" for import "resolve"
node_modules/electron-fetch/lib/index.es.js:3:9: ERROR: No matching export in "browser-external:http" for import "STATUS_CODES"
node_modules/electron-fetch/lib/index.es.js:6:17: ERROR: No matching export in "browser-external:stream" for import "PassThrough"
at failureErrorWithLog (/Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:1602:15)
at /Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:1248:28
at runOnEndCallbacks (/Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:1033:63)
at buildResponseToResult (/Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:1246:7)
at /Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:1355:14
at /Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:665:9
at handleIncomingPacket (/Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:762:9)
at Socket.readFromStdout (/Users/yingshaoxo/CS/libgen2/node_modules/esbuild/lib/main.js:632:7)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12) {
errors: [
{
detail: undefined,
location: [Object],
notes: [],
pluginName: '',
text: 'No matching export in "browser-external:url" for import "parse"'
},
{
detail: undefined,
location: [Object],
notes: [],
pluginName: '',
text: 'No matching export in "browser-external:url" for import "format"'
},
{
detail: undefined,
location: [Object],
notes: [],
pluginName: '',
text: 'No matching export in "browser-external:url" for import "resolve"'
},
{
detail: undefined,
location: [Object],
notes: [],
pluginName: '',
text: 'No matching export in "browser-external:http" for import "STATUS_CODES"'
},
{
detail: undefined,
location: [Object],
notes: [],
pluginName: '',
text: 'No matching export in "browser-external:stream" for import "PassThrough"'
}
],
warnings: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Crash when adding a comment after an import in script setup
Successfully merging a pull request may close this issue. fix(compiler-sfc): should extract comment for import or type declarat… underfin/vue-next.
Read more >IPFS and Vue; dependency not found - Help
I'm using IPFS with Vue but cannot get the app to start because of a dependency error. I have a very simple setup:...
Read more >Vue: npm run serve crashes when a broken link is added
It seems to be a problem with the stat command crashing after automatically trying to follow the broken link: .#navigation.vue .
Read more >Vue.js + IPFS = VIPFS. Getting Started Tutorial - YouTube
This is a getting started tutorial for my Open-Source framework called VIPFS.GitHub: https://github.com/anthonybudd/vipfs.
Read more >IPFS Vue JS Drizzle Plugin Ethereum Blockchain Dapp Tutorial
In this video, I run through how to build a Vue JS application using the Drizzle Vue JS plugin as well as IPFS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I would love to have a solution
Because, as you see,
ipfs-http-client
is indeed a browser-based package, it’s not a node package: https://github.com/ipfs-examples/js-ipfs-http-client-bundle-webpack/blob/main/src/App.js#L2I just don’t get why by only importing it, I got errors.
Alright, I’ve fixed it: