This repository was archived by the owner on May 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
NextJS Server Error #61
Copy link
Copy link
Open
Description
I'm getting the following error when running this in NextJS. I'm using the following config.
Server Error
Error: No "exports" main resolved in /Users/.../node_modules/react-dat-gui/package.json
This error happened while generating the page. Any console logs will be displayed in the terminal window.
const Controls = () => {
const state = {
data: {
package: 'react-dat-gui',
cameraRotationX: 0.6,
},
}
const [data, setData] = useState(state)
// Update current state with changes from controls
const handleUpdate = (newData) => {
console.log('newData', newData)
setData((prevState) => ({
data: { ...prevState.data, ...newData },
}))
}
console.log('data', data)
return (
<DatGui
data={data}
onUpdate={handleUpdate}
className="react-dat-gui-relative-position"
>
<DatNumber
path="cameraRotationX"
label="Number"
min={-100}
max={100}
step={0.1}
/>
</DatGui>
)
}
And then in my main React component, just calling <Controls />.
Metadata
Metadata
Assignees
Labels
No labels