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
Add serverDependenciesToBundle: ['wired-elements-react', '@lit-labs/react'] to remix.config.js (I can't find any docs that even explain what serverDependenciesToBundle is or why it is needed)
Expected Behavior
Just be able to use the components.
Actual Behavior
Get the following error:
/Users/olliew/code/wireframe/node_modules/wired-elements/lib/wired-button.js:10
import { WiredBase, BaseCSS } from './wired-base';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1195:20)
at Module._compile (node:internal/modules/cjs/loader:1239:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Function.Module._load (node:internal/modules/cjs/loader:972:12)
at Module.require (node:internal/modules/cjs/loader:1157:19)
at require (node:internal/modules/helpers:119:18)
at Object.<anonymous> (/Users/olliew/code/wireframe/node_modules/wired-elements-react/lib/WiredButton.js:3:45)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
GET / 500 - - 27.342 ms
This discussion was converted from issue #6007 on April 25, 2023 18:37.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What version of Remix are you using?
^1.15.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Set up a new Remix project using Remix App Server. NPM install wired-elements-react.
Import a component
Use the component somewhere in the code
Add
serverDependenciesToBundle: ['wired-elements-react', '@lit-labs/react']
to remix.config.js (I can't find any docs that even explain what serverDependenciesToBundle is or why it is needed)Expected Behavior
Just be able to use the components.
Actual Behavior
Get the following error:
Beta Was this translation helpful? Give feedback.
All reactions