webpack-contrib / purifycss-webpack

UNMAINTAINED, use https://github.com/FullHuman/purgecss-webpack-plugin
MIT License
772 stars 37 forks source link

example build error #70

Closed jeggett closed 7 years ago

jeggett commented 7 years ago

I git clone your repo and cd examples && npm i && npm run build Got this error:

module.js:472
    throw err;
    ^

Error: Cannot find module '../'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/jeggett/test/purifycss-webpack/examples/webpack.parts.js:2:25)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

Maybe this line const PurifyCSSPlugin = require('../'); from webpack.config.js caused that?

bebraw commented 7 years ago

Hi,

Did you npm i at the project root too? You may have to npm run build there too as otherwise it might not resolve to the code as it's precompiled.

I'll add more docs on this.

jeggett commented 7 years ago

No, sorry. =( I didn't think about that. Probably because I never stumbled on such require(../) when I run examples in other projects repositories.