Skip to content
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

wip #185

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

wip #185

wants to merge 1 commit into from

Conversation

0xaptosj
Copy link
Contributor

@0xaptosj 0xaptosj commented Aug 12, 2024

I'm getting this weird dependency error when running the new example scaffold using create-aptos-dapp. But when I use create-aptos-dapp with npm published surf (old version), I don't have this issue.

This is probably an error with wallet adaptor?

$ vite
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
Port 5173 is in use, trying another one...

  VITE v5.4.0  ready in 370 ms

  ➜  Local:   http://localhost:5174/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
✘ [ERROR] Could not resolve "aptos"

    node_modules/@aptos-labs/wallet-adapter-core/dist/index.mjs:5:65:
      5 │ import { TxnBuilderTypes as TxnBuilderTypes4, BCS as BCS2 } from "aptos";
        ╵                                                                  ~~~~~~~

  You can mark the path "aptos" as external to exclude it from the bundle, which will remove this
  error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "@mizuwallet-sdk/core"

    node_modules/@mizuwallet-sdk/aptos-wallet-adapter/dist/index.js:5:27:
      5 │ import { Mizu as hr } from "@mizuwallet-sdk/core";
        ╵                            ~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@mizuwallet-sdk/core" as external to exclude it from the bundle, which will
  remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "aptos"

    node_modules/@aptos-connect/wallet-adapter-plugin/dist/index.mjs:357:32:
      357 │ import { TxnBuilderTypes } from "aptos";
          ╵                                 ~~~~~~~

  You can mark the path "aptos" as external to exclude it from the bundle, which will remove this
  error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "aptos"

    node_modules/@identity-connect/wallet-api/dist/index.mjs:3:20:
      3 │ import { BCS } from "aptos";
        ╵                     ~~~~~~~

  You can mark the path "aptos" as external to exclude it from the bundle, which will remove this
  error and leave the unresolved path in the bundle.

/Users/jianyishi/go/src/github.com/0xaptosj/surf/example2/node_modules/esbuild/lib/main.js:1472
  let error = new Error(text);
              ^

Error: Build failed with 4 errors:
node_modules/@aptos-connect/wallet-adapter-plugin/dist/index.mjs:357:32: ERROR: Could not resolve "aptos"
node_modules/@aptos-labs/wallet-adapter-core/dist/index.mjs:5:65: ERROR: Could not resolve "aptos"
node_modules/@identity-connect/wallet-api/dist/index.mjs:3:20: ERROR: Could not resolve "aptos"
node_modules/@mizuwallet-sdk/aptos-wallet-adapter/dist/index.js:5:27: ERROR: Could not resolve "@mizuwallet-sdk/core"
    at failureErrorWithLog (/Users/jianyishi/go/src/github.com/0xaptosj/surf/example2/node_modules/esbuild/lib/main.js:1472:15)
    at /Users/jianyishi/go/src/github.com/0xaptosj/surf/example2/node_modules/esbuild/lib/main.js:945:25
    at /Users/jianyishi/go/src/github.com/0xaptosj/surf/example2/node_modules/esbuild/lib/main.js:1353:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v18.20.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@0xaptosj 0xaptosj marked this pull request as draft August 12, 2024 08:00
@0xaptosj
Copy link
Contributor Author

will delete old example and rename example2 to example after i fix the error.

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

Successfully merging this pull request may close these issues.

1 participant