angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

npm test fails with 'invalid config file' #2749

Closed zeripath closed 5 years ago

zeripath commented 5 years ago
Item Version
generator-angular-fullstack 5.0.0-rc.2 (master)
Node v10.7.0
npm 6.1.0
Operating System Ubuntu 18.04 LTS

With a clean checkout and npm install, npm test fails with multiple errors, likely due to the following stackTrace:

Invalid config file! Error: Cannot find module 'compression-webpack-plugin' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (/tmp/4cf881a2b281f79bfeed46abed0bdd90bc3dfdb9/webpack.make.js:3:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (/tmp/4cf881a2b281f79bfeed46abed0bdd90bc3dfdb9/karma.conf.js:5:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32)

Awk34 commented 5 years ago

With a fresh install, the tests run fine for me, as compression-webpack-plugin installs for me normally. Have you tried RC 3?

zeripath commented 5 years ago

So I think the issue I was experiencing was partially due to not running npm run pre-test before npm test

I also had to do an npm rebuild because I think I had been messing with the package.json too much.

On Thu, 26 Jul 2018, 08:17 Andrew Koroluk, notifications@github.com wrote:

With a fresh install, the tests run fine for me, as compression-webpack-plugin installs for me normally. Have you tried RC 3?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angular-fullstack/generator-angular-fullstack/issues/2749#issuecomment-408000889, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvW9gTbv_7Fm2sDnm5Ui2rxYM6DKNwtks5uKWzrgaJpZM4VaCRP .

-- Andrew Thornton art27@cantab.net

Awk34 commented 5 years ago

We don't have a pretest script.

Also note I've been working on depending on Gulp less, so there's separate test:client & test:server scripts that use karma / mocha CLI commands directly.

Closing issue for now as it seems like this isn't a problem