You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue I am having is quite peculiar, in certain Ubuntu installations open-next package fails to compile with the following bizarre error during the server function generation,
┌──────────────────────────────┐
│ OpenNext — Generating bundle │
└──────────────────────────────┘
Bundling static assets...
Bundling cache assets...
Bundling server function...
✘ [ERROR] Could not resolve "@aws-sdk/client-dynamodb"
node_modules/open-next/dist/adapters/server-adapter.js:2:31:
2 │ import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@aws-sdk/client-dynamodb" here because it's not
listed as a dependency of this package:
../../.pnp.cjs:86:31:
86 │ "packageDependencies": [\
╵ ~~
You can mark the path "@aws-sdk/client-dynamodb" as external to exclude it from the bundle, which
will remove this error.
✘ [ERROR] Could not resolve "@aws-sdk/client-s3"
node_modules/open-next/dist/adapters/server-adapter.js:3:25:
3 │ import { S3Client } from "@aws-sdk/client-s3";
╵ ~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@aws-sdk/client-s3" here because it's not listed
as a dependency of this package:
../../.pnp.cjs:86:31:
86 │ "packageDependencies": [\
╵ ~~
You can mark the path "@aws-sdk/client-s3" as external to exclude it from the bundle, which will
remove this error.
✘ [ERROR] Could not resolve "@aws-sdk/client-sqs"
node_modules/open-next/dist/adapters/plugins/routing/util.js:1:46:
1 │ import { SendMessageCommand, SQSClient } from "@aws-sdk/client-sqs";
╵ ~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@aws-sdk/client-sqs" here because it's not listed
as a dependency of this package:
../../.pnp.cjs:86:31:
86 │ "packageDependencies": [\
╵ ~~
You can mark the path "@aws-sdk/client-sqs" as external to exclude it from the bundle, which will
remove this error.
/home/myuser/open-next-project/node_modules/esbuild/lib/main.js:1649
let error = new Error(text);
^
Error: Build failed with 3 errors:
node_modules/open-next/dist/adapters/plugins/routing/util.js:1:46: ERROR: Could not resolve "@aws-sdk/client-sqs"
node_modules/open-next/dist/adapters/server-adapter.js:2:31: ERROR: Could not resolve "@aws-sdk/client-dynamodb"
node_modules/open-next/dist/adapters/server-adapter.js:3:25: ERROR: Could not resolve "@aws-sdk/client-s3"
at failureErrorWithLog (/home/myuser/open-next-project/node_modules/esbuild/lib/main.js:1649:15)
at /home/myuser/open-next-project/node_modules/esbuild/lib/main.js:1058:25
at /home/myuser/open-next-project/node_modules/esbuild/lib/main.js:1003:52
at buildResponseToResult (/home/myuser/open-next-project/node_modules/esbuild/lib/main.js:1056:7)
at /home/myuser/open-next-project/node_modules/esbuild/lib/main.js:1085:16
at responseCallbacks.<computed> (/home/myuser/open-next-project/node_modules/esbuild/lib/main.js:703:9)
at handleIncomingPacket (/home/myuser/open-next-project/node_modules/esbuild/lib/main.js:762:9)
at Socket.readFromStdout (/home/myuser/open-next-project/node_modules/esbuild/lib/main.js:679:7)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:335:12) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Node.js v18.18.2
This is an issue with yarn pnp.
One easy fix would be to not use pnp
If you need it, you may want to take a look at this evanw/esbuild#2495 (comment) or experiment with some of the pnp options
The issue I am having is quite peculiar, in certain Ubuntu installations
open-next
package fails to compile with the following bizarre error during the server function generation,Package.json is as follows,
In MacOS using the exact same config and commands it works. I have reinstalled everything,
npm
,Node.js
,node_modules
the usual stuff to no avail.Does anyone have any idea why this fails to build? Happy to provide more info wrt to the project, in case that's needed....
The text was updated successfully, but these errors were encountered: