Cannot find module 'classnames'

You should post your package.json file, and the code of which file is trying to pull class names. That said it sounds like you're simply missing a dependency.

npm install classnames --save

Will add it to your package.json file and install it in node_modules. Re-run your grunt server after installing or updating any npm packages.


First, install it with npm install classnames. In Windows, everything will be fine if you write

import classNames from 'classnames'

but in Linux, I got this error that 'classnames' is not defined... and the problem was the capital letter I wrote 'classNames' instead of 'classnames' for module import, so consider that it might solve your problem.