cyan33 / learn-react-source-code

Build react from scratch (code + blog)
208 stars 23 forks source link

demo 下 npm run watch 报错 #11

Closed sfyr111 closed 6 years ago

sfyr111 commented 6 years ago

ERROR in ../dilithium/index.js Module build failed: ReferenceError: Unknown plugin "transform-class-properties" specified in "/Users/yangran/project/learn-react-source-code/dilithium/package.json" at 0, attempted to resolve relative to "/Users/yangran/project/learn-react-source-code/dilithium"

cyan33 commented 6 years ago

It works well on my end. Can you try deleting the node_modules and re-run npm install?

zaleGZL commented 6 years ago

I have the same error. image

cyan33 commented 6 years ago

I've tested again and it works on my end.

This error is likely because of it doesn't have transform-class-properties installed (I don't know why because it's already been specified in package.json). You might want to try this:

npm install babel-plugin-transform-class-properties