when i excute 'npm run dev' ,then throws a error
liofchina opened this issue · 1 comments
error in ./node_modules/ipfs-http-client/src/utils/load-commands.js
Module parse failed: Unexpected token (5:4)
You may need an appropriate loader to handle this file type.
| function requireCommands (send, config) {
| const cmds = {
| ...require('../files-regular')(config),
| getEndpointConfig: require('../get-endpoint-config')(config)
| }
@ ./node_modules/ipfs-http-client/src/index.js 13:21-53
@ ./src/apis/ipfs/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8081 webpack/hot/dev-server ./src/main.js
Looks like you're using an old version of webpack. Check out our example for bundling with webpack: https://github.com/ipfs/js-ipfs-http-client/tree/master/examples/bundle-webpack