Reputation: 4173
I have just got preact-redux-example
up and running, and now I am attempting to use Preact Dev Tools in my app.
Based on this post I assumed it was a case of adding
import 'preact/devtools'
into the entry point (app.js
) file.
However, this yields the following error:
./src/components/app.js
Module not found: Error: Cannot resolve module 'preact/devtools'
Is there something else I need to install, or am I on the wrong track?
Upvotes: 6
Views: 2959
Reputation: 32992
preact/devtools
has landed in version 6.4.0, but the example project uses version 4.8.0
. So you need to upgrade the preact version to be able to import it:
npm install --save preact@latest
Or if you're using yarn you can run:
yarn upgrade preact
Upvotes: 7