React-redux-starter-kit: npm run tests fails with error related to PostCSS

Created on 16 Jan 2017  路  4Comments  路  Source: davezuko/react-redux-starter-kit

git clone ...
npm install
npm run test
npm run test                                                                                                           

> [email protected] test /Users/liubko/Code/react-redux-starter-kit
> better-npm-run test

running better-npm-run in /Users/liubko/Code/react-redux-starter-kit
Executing script: test

to be executed: node ./node_modules/karma/bin/karma start config/karma.config
  app:config:project Creating default configuration. +0ms
  app:config:project Looking for environment overrides for NODE_ENV "test". +7ms
  app:config:project No environment overrides found, defaults will be used. +4ms
  app:config:webpack Creating configuration. +3s
  app:config:webpack Applying ExtractTextPlugin to CSS loaders. +354ms
  app:config:karma Creating configuration. +2ms

START:
16 01 2017 19:27:13.475:ERROR [karma]: Error: Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /Users/liubko/Code/react-redux-starter-kit/src/layouts/CoreLayout
    at Error (native)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-load-config/index.js:51:26
    at DependenciesBlock.onModuleBuildFailed (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-loader/index.js:141:13,Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /Users/liubko/Code/react-redux-starter-kit/src/components/Header
    at Error (native)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-load-config/index.js:51:26
    at DependenciesBlock.onModuleBuildFailed (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-loader/index.js:141:13,Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /Users/liubko/Code/react-redux-starter-kit/src/routes/Home/components
    at Error (native)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-load-config/index.js:51:26
    at DependenciesBlock.onModuleBuildFailed (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-loader/index.js:141:13,Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /Users/liubko/Code/react-redux-starter-kit/src/styles
    at Error (native)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-load-config/index.js:51:26
    at DependenciesBlock.onModuleBuildFailed (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/postcss-loader/index.js:141:13
    at Compiler.<anonymous> (/Users/liubko/Code/react-redux-starter-kit/config/webpack.config.js:78:15)
    at Compiler.applyPlugins (/Users/liubko/Code/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:26:37)
    at Watching._done (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:78:17)
    at Watching.<anonymous> (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:61:18)
    at Compiler.emitRecords (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:282:37)
    at Watching.<anonymous> (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:58:19)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:275:11
    at Compiler.applyPluginsAsync (/Users/liubko/Code/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:60:69)
    at Compiler.afterEmit (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:272:8)
    at Compiler.<anonymous> (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:267:14)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/async/lib/async.js:52:16
    at done (/Users/liubko/Code/react-redux-starter-kit/node_modules/async/lib/async.js:246:17)
    at /Users/liubko/Code/react-redux-starter-kit/node_modules/async/lib/async.js:44:16
    at MemoryFileSystem.writeFile (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
    at Compiler.writeOut (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:261:27)
    at Immediate.<anonymous> (/Users/liubko/Code/react-redux-starter-kit/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)

npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/liubko/.nvm/versions/node/v6.9.2/bin/node" "/Users/liubko/.nvm/versions/node/v6.9.2/bin/npm" "run" "test"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test: `better-npm-run test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script 'better-npm-run test'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-redux-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     better-npm-run test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react-redux-starter-kit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react-redux-starter-kit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/liubko/Code/react-redux-starter-kit/npm-debug.log

Most helpful comment

@liubko so, since npm run test uses the config/karma.config.js file, making the below modification makes the tests pass.

below sassLoader: webpackConfig.sassLoader, line, add

postcss : webpackConfig.postcss

And the tests will pass. This is no way a solution to this problem but at least this is help for someone who's trying this starter kit.

More insight is welcome. Thanks.

All 4 comments

@liubko Yeah, this issue has come up very recently. More info here

@liubko so, since npm run test uses the config/karma.config.js file, making the below modification makes the tests pass.

below sassLoader: webpackConfig.sassLoader, line, add

postcss : webpackConfig.postcss

And the tests will pass. This is no way a solution to this problem but at least this is help for someone who's trying this starter kit.

More insight is welcome. Thanks.

Closing as originally resolved with @ptim 's comment, but postcss has now been removed with https://github.com/davezuko/react-redux-starter-kit/releases/tag/v3.0.0 in favor of utilizing css-loader options directly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rpribadi-ds picture rpribadi-ds  路  5Comments

orielz picture orielz  路  3Comments

postalservice14 picture postalservice14  路  4Comments

ciokan picture ciokan  路  4Comments

jokeyrhyme picture jokeyrhyme  路  5Comments