maisano / react-router-transition

painless transitions built for react-router, powered by react-motion
http://maisano.github.io/react-router-transition/
MIT License
2.59k stars 138 forks source link

Parceljs cannot compile #84

Closed houlonglong closed 6 years ago

houlonglong commented 6 years ago

Server running at http://localhost:1234 🚨 /Volumes/HDD/project/projects/lawson_event_frontend/node_modules/react-router-transition/lib/react-router-transition.js:117:27: Cannot resolve dependency ' module.exports = require('./factoryWithThrowingShims')(); | ^ }

maisano commented 6 years ago

hi @houlonglong! that module, factoryWithThrowingShims is from the prop-types package [link]. do you have that installed? if you ran npm install react-router-transition, you should have it as a transitive dependency.

bsonntag commented 6 years ago

I'm having a similar error:

Error: Cannot find module './factoryWithThrowingShims' from '/path/to/project/node_modules/react-router-transition/lib'

I have prop-types installed.

bsonntag commented 6 years ago

I fixed this by setting an alias of react-router-transition to react-router-transition/lib/index.js in my babel config.

I think this happened to me because I'm using browserify and it probably tried to use the main entry defined in the package.json, which points to "lib/react-router-transition.js".

maisano commented 6 years ago

@houlonglong @bsonntag – i just published 1.1.3 which should fix this issue. thanks for pointing it out!

bsonntag commented 6 years ago

@maisano I can confirm that it's now working. Thanks!