My project: https://github.com/KyleTryon/VidFireBlog
Based on: https://github.com/contentful/blog-in-5-minutes/
I have just added AVA testing trying to follow this example: https://nuxtjs.org/examples/testing/
When running the test script I get the following error
Full error:
ERROR in pages/blog/_slug.2ac1837fe29f7bf12a78.js from UglifyJs
Unexpected token: punc (() [pages/blog/_slug.2ac1837fe29f7bf12a78.js:682,11]
ERROR in pages/blog/index.93c50088bce151b8ccd3.js from UglifyJs
Unexpected token: punc (() [pages/blog/index.93c50088bce151b8ccd3.js:1142,11]
ERROR in pages/blog/articlePage.0dd516829d3a25f54ebd.js from UglifyJs
Unexpected token: punc (() [./plugins/contentful.js:9,2][pages/blog/articlePage.0dd516829d3a25f54ebd.js:5960,14]
ERROR in app.80d410dd093a7d887898.js from UglifyJs
Unexpected token: punc (() [./.nuxt/components/no-ssr.js:8,2][app.80d410dd093a7d887898.js:19,6]
✖ Init Nuxt.js Rejected promise returned by test
1 test failed
Init Nuxt.js
/mnt/e/projects/VidFireBlog/VidFireBlog/node_modules/nuxt/lib/builder/builder.js:498
Rejected promise returned by test. Reason:
Error {
message: 'Webpack build exited with errors',
}
node_modules/nuxt/lib/builder/builder.js:498:27
emitRecords.err (node_modules/webpack/lib/Compiler.js:265:13)
Compiler.emitRecords (node_modules/webpack/lib/Compiler.js:371:38)
emitAssets.err (node_modules/webpack/lib/Compiler.js:258:10)
applyPluginsAsyncSeries1.err (node_modules/webpack/lib/Compiler.js:364:12)
next (node_modules/tapable/lib/Tapable.js:218:11)
Compiler.compiler.plugin (node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
Compiler.applyPluginsAsyncSeries1 (node_modules/tapable/lib/Tapable.js:222:13)
Compiler.afterEmit (node_modules/webpack/lib/Compiler.js:361:9)
require.forEach.err (node_modules/webpack/lib/Compiler.js:350:15)
node_modules/async/dist/async.js:473:16
iteratorCallback (node_modules/async/dist/async.js:1050:13)
node_modules/async/dist/async.js:958:16
node_modules/graceful-fs/graceful-fs.js:43:10
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vidfire-blog@1.0.0 test: `ava --serial --verbose`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vidfire-blog@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kyle/.npm/_logs/2017-12-27T22_19_13_116Z-debug.log
I have seen a few other issues online that are similar but no clear answers.
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2142">#c2142</a>)</em></sub></div>