Open mschoch opened 3 days ago
Additionally, while trying to upgrade the firehouse-chat application, I encounter the following similar issues that seem related to the package of the partykit gateway package.
❯ pnpm dev
> react-fireproof@0.0.0 dev /Users/mschoch/firehouse-chat
> partykit dev --live
🎈 PartyKit v0.0.85
--------------------
▲ [WARNING] Duplicate "className" attribute in JSX element [duplicate-object-key]
src/client.tsx:41:46:
41 │ <div className={styles.layoutSidebar} className={`${styles.layoutSidebar} ${isMobChannelsOpen ...
╵ ~~~~~~~~~
The original "className" attribute is here:
src/client.tsx:41:13:
41 │ <div className={styles.layoutSidebar} className={`${styles.layoutSidebar} ${isMobChannelsOpen ...
╵ ~~~~~~~~~
▲ [WARNING] Duplicate "className" attribute in JSX element [duplicate-object-key]
src/components/Message.tsx:53:28:
53 │ <li className="message" className={styles.listItem}>
╵ ~~~~~~~~~
The original "className" attribute is here:
src/components/Message.tsx:53:8:
53 │ <li className="message" className={styles.listItem}>
╵ ~~~~~~~~~
✘ [ERROR] Could not resolve "node:fs/promises"
node_modules/.pnpm/@fireproof+core@0.19.111_react@18.3.1_typescript@5.5.4/node_modules/@fireproof/core/node-filesystem-INX4ZTHE.js:10:27:
10 │ this.fs = await import("node:fs/promises");
╵ ~~~~~~~~~~~~~~~~~~
The package "node:fs/promises" wasn't found on the file system but is built into node. Are you
trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this
error.
✘ [ERROR] Could not resolve "node:fs/promises"
node_modules/.pnpm/use-fireproof@0.19.111_react@18.3.1_typescript@5.5.4/node_modules/use-fireproof/node-filesystem-DCI7OGPH.js:10:27:
10 │ this.fs = await import("node:fs/promises");
╵ ~~~~~~~~~~~~~~~~~~
The package "node:fs/promises" wasn't found on the file system but is built into node. Are you
trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this
error.
✘ [ERROR] Could not resolve "path"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:8:27:
8 │ const pathModule = require("path");
╵ ~~~~~~
The package "path" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "assert"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:11:23:
11 │ const assert = require("assert");
╵ ~~~~~~~~
The package "assert" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "util"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:12:21:
12 │ const util = require("util");
╵ ~~~~~~
The package "util" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "stream"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:17:25:
17 │ const stream_1 = require("stream");
╵ ~~~~~~~~
The package "stream" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "events"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:19:25:
19 │ const events_1 = require("events");
╵ ~~~~~~~~
The package "events" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "util"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:22:21:
22 │ const util = require("util");
╵ ~~~~~~
The package "util" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "events"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/node.js:7:25:
7 │ const events_1 = require("events");
╵ ~~~~~~~~
The package "events" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
Error: Build failed with 9 errors:
node_modules/.pnpm/@fireproof+core@0.19.111_react@18.3.1_typescript@5.5.4/node_modules/@fireproof/core/node-filesystem-INX4ZTHE.js:10:27: ERROR: Could not resolve "node:fs/promises"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:11:23: ERROR: Could not resolve "assert"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:12:21: ERROR: Could not resolve "util"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/node.js:7:25: ERROR: Could not resolve "events"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:8:27: ERROR: Could not resolve "path"
...
at failureErrorWithLog (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1651:15)
at /Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1059:25
at /Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1004:52
at buildResponseToResult (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1057:7)
at /Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1086:16
at responseCallbacks.<computed> (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:704:9)
at handleIncomingPacket (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:764:9)
at Socket.readFromStdout (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:680:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "node:fs/promises"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "assert"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "util"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "events"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "path"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "stream"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "events"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "util"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "node:fs/promises"'
}
],
warnings: [
{
detail: undefined,
id: 'duplicate-object-key',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Duplicate "className" attribute in JSX element'
},
{
detail: undefined,
id: 'duplicate-object-key',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Duplicate "className" attribute in JSX element'
}
]
}
Error: Build failed with 9 errors:
node_modules/.pnpm/@fireproof+core@0.19.111_react@18.3.1_typescript@5.5.4/node_modules/@fireproof/core/node-filesystem-INX4ZTHE.js:10:27: ERROR: Could not resolve "node:fs/promises"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:11:23: ERROR: Could not resolve "assert"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:12:21: ERROR: Could not resolve "util"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/node.js:7:25: ERROR: Could not resolve "events"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:8:27: ERROR: Could not resolve "path"
...
at failureErrorWithLog (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1651:15)
at /Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1059:25
at /Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1004:52
at buildResponseToResult (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1057:7)
at /Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1086:16
at responseCallbacks.<computed> (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:704:9)
at handleIncomingPacket (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:764:9)
at Socket.readFromStdout (/Users/mschoch/firehouse-chat/node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:680:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "node:fs/promises"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "assert"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "util"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "events"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "path"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "stream"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "events"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "util"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "node:fs/promises"'
}
],
warnings: [
{
detail: undefined,
id: 'duplicate-object-key',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Duplicate "className" attribute in JSX element'
},
{
detail: undefined,
id: 'duplicate-object-key',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Duplicate "className" attribute in JSX element'
}
]
}
ERROR Build failed with 9 errors:
node_modules/.pnpm/@fireproof+core@0.19.111_react@18.3.1_typescript@5.5.4/node_modules/@fireproof/core/node-
filesystem-INX4ZTHE.js:10:27: ERROR: Could not resolve "node:fs/promises"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:11:23: ERROR: Could not resolve
"assert"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:12:21: ERROR: Could not resolve
"util"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/node.js:7:25: ERROR: Could not resolve "events"
node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:8:27: ERROR: Could not resolve "path"
...
-node_modules/.pnpm/@fireproof+core@0.19.111_react@18.3.1_typescript@5.5.4/node_modules/@fireproof/core/node-files
ystem-INX4ZTHE.js:10:27: ERROR: Could not resolve "node:fs/promises"
-node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:11:23: ERROR: Could not resolve
"assert"
- node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/internal/errors.js:12:21: ERROR: Could not resolve "util"
- node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/node.js:7:25: ERROR: Could not resolve "events"
- node_modules/.pnpm/memfs@4.14.0/node_modules/memfs/lib/volume.js:8:27: ERROR: Could not resolve "path"
- ...
- failureErrorWithLog (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1651:15)
- (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1059:25)
- (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1004:52)
- buildResponseToResult (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1057:7)
- (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:1086:16)
- responseCallbacks.<computed> (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:704:9)
- handleIncomingPacket (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:764:9)
- Socket.readFromStdout (node_modules/.pnpm/esbuild@0.20.0/node_modules/esbuild/lib/main.js:680:7)
- Socket.emit (node:events:519:28)
- addChunk (node:internal/streams/readable:559:12)
I'm able to use fireproof v0.19 + partykit with the IIFE builds, however I have another app which is a react app, and upgrading it to v0.19 fails with the following:
Here is my package.json:
This was an app that worked previous using v0.18 and a different connector. I simply upgraded fireproof and switched connectors. I suspect that the partykit package is still doing something wrong.
Updated: I had failed to update
use-fireproof
, but I confirmed this was unrelated (still fails with same error)