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

✘ [ERROR] Could not resolve "@aws-sdk/client-dynamodb" #193

Open
valbaca opened this issue Oct 4, 2024 · 2 comments
Open

✘ [ERROR] Could not resolve "@aws-sdk/client-dynamodb" #193

valbaca opened this issue Oct 4, 2024 · 2 comments

Comments

@valbaca
Copy link

valbaca commented Oct 4, 2024

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

Ran the following with alias pn=pnpm

valbaca@maxbook js % pn dlx create-remix@latest --template remix-run/grunge-stack

 remix   v2.12.1 πŸ’Ώ Let's build a better website...

   dir   Where should we create your new project?
         ./hello-grunge

      β—Ό  Template: Using remix-run/grunge-stack...
      βœ”  Template copied

   git   Initialize a new git repository?
         Yes

  deps   Install dependencies with pnpm?
         Yes

  init   This template has a remix.init script. Do you want to run it?
         Yes

      βœ”  Dependencies installed

      βœ”  Git initialized
      βœ”  Dependencies for remix.init script installed

      β—Ό  Running template's remix.init script...

? Do you want to run the build/tests/etc to verify things are setup properly? Yes

Expected Behavior

Successful startup after initial setup

Actual Behavior

valbaca@maxbook hello-grunge % pn dev

> hello-grunge-b2cc@ dev /Users/valbaca/Code/js/hello-grunge
> remix dev --manual -c "arc sandbox -e testing"


 πŸ’Ώ  remix dev

⚠️  Test routes enabled.
 info  building...
✘ [ERROR] Build failed with 4 errors:
node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:16:25: ERROR: Could not resolve "@aws-sdk/client-dynamodb"
node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:18:28: ERROR: Could not resolve "@aws-sdk/lib-dynamodb"
node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:24:25: ERROR: Could not resolve "aws-sdk/clients/dynamodb"
node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:57:40: ERROR: Could not resolve "@smithy/node-http-handler" [plugin css-bundle-plugin]

    app/root.tsx:20:30:
      20 β”‚ import { cssBundleHref } from "@remix-run/css-bundle";
         β•΅                               ~~~~~~~~~~~~~~~~~~~~~~~

  This error came from the "onLoad" callback registered here:

    node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_typ_roc5sjsp5ppwfghrzndgv6kr4u/node_modules/@remix-run/dev/dist/compiler/plugins/cssBundlePlugin.js:35:12:
      35 β”‚       build.onLoad({
         β•΅             ~~~~~~

    at setup (/Users/valbaca/Code/js/hello-grunge/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_typ_roc5sjsp5ppwfghrzndgv6kr4u/node_modules/@remix-run/dev/dist/compiler/plugins/cssBundlePlugin.js:35:13)
    at handlePlugins (/Users/valbaca/Code/js/hello-grunge/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1279:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)


✘ [ERROR] Could not resolve "@aws-sdk/client-dynamodb"

    node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:16:25:
      16 β”‚     let dynamo = require('@aws-sdk/client-dynamodb')
         β•΅                          ~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@aws-sdk/client-dynamodb" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.


✘ [ERROR] Could not resolve "@aws-sdk/lib-dynamodb"

    node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:18:28:
      18 β”‚     let docclient = require('@aws-sdk/lib-dynamodb')
         β•΅                             ~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@aws-sdk/lib-dynamodb" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.


✘ [ERROR] Could not resolve "aws-sdk/clients/dynamodb"

    node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:24:25:
      24 β”‚     let dynamo = require('aws-sdk/clients/dynamodb')
         β•΅                          ~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "aws-sdk/clients/dynamodb" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.


✘ [ERROR] Could not resolve "@smithy/node-http-handler"

    node_modules/.pnpm/@[email protected]/node_modules/@architect/functions/src/tables/legacy.js:57:40:
      57 β”‚       let { NodeHttpHandler } = require('@smithy/node-http-handler')
         β•΅                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@smithy/node-http-handler" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
@valbaca
Copy link
Author

valbaca commented Oct 4, 2024

I'm new to Remix Stacks, so not sure if this is known or not, figured I'd Open an Issue first.

I'm guessing it's an outdated architect and/or incompatibility with dynamodb

@valbaca
Copy link
Author

valbaca commented Oct 4, 2024

Same issue when running with npx.

macOS, node v22.9.0

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

No branches or pull requests

1 participant