Issues using yarn(npm) link with parcel

  Kiến thức lập trình

I am trying to link three.js via yarn link into a repo that uses parcel.

Every time I run parcel it seems to complain about a different file from three/examples/jsm... eg:

@parcel/core: Failed to resolve 'three' from 'D:/projects/three.js/examples/jsm/animation/MMDPhysics.js'
@parcel/core: Failed to resolve 'three' from 'D:/projects/three.js/examples/jsm/cameras/CinematicCamera.js'
@parcel/core: Failed to resolve 'three' from 'D:/projects/three.js/examples/jsm/animation/CCDIKSolver.js'

I don’t mention these at all in the main repo. Why is parcel attempting to build them? If I delete the /examples it seems to go through, but I have one import from there which is then missing. How can I make parcel not run into these files? This happens with npm link too.

LEAVE A COMMENT