builder icon indicating copy to clipboard operation
builder copied to clipboard

Failed to compile error on new project: "Package path ./examples/js/libs/stats.min is not exported from package node_modules/three"

Open dustmop opened this issue 3 years ago • 0 comments

The getting started steps lead to an error instead of a working example app.

To Reproduce Steps to reproduce the behavior:

  1. Ran npm init builder.io to create a new project, accepted all default steps
  2. The error happens
> start
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
🌐 Visit this URL on this device to open the editor:
  http://builder.io/onboarding/starter?overridePreviewUrl=http%3A%2F%2Flocalhost%3A3000&projectName=my-builder-app&starter=Nextjs&cpus=8&arch=x64&totalmem=17179869184&platform=darwin&node=v16.14.2&yarn=false&cli=true&onboarding=false
error - ./node_modules/@react-three/drei/core/Stats.js:3:0
Module not found: Package path ./examples/js/libs/stats.min is not exported from package /my-code/builder.io/hello/my-builder-app/node_modules/three (see exports field in /my-code/builder.io/hello/my-builder-app/node_modules/three/package.json)

Import trace for requested module:
./node_modules/@react-three/drei/index.js
./components/ShoesViewer.tsx
./pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found

Running on macos 10.14.6, node version is v16.14.2, but I see the same error under v14.17.1 and v15.0.1. Using node v12.16.3 gives the message "Error: Not supported" instead.

dustmop avatar Mar 28 '22 19:03 dustmop