Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run test does not work #16

Closed
sobolevn opened this issue May 15, 2018 · 0 comments
Closed

npm run test does not work #16

sobolevn opened this issue May 15, 2018 · 0 comments

Comments

@sobolevn
Copy link

sobolevn commented May 15, 2018

Steps to reproduce

  1. git clone this repo
  2. npm i
  3. npm test

Env

Node: v9.4.0
Npm: 5.6.0

Output

» npm run test

> @nuxtjs/google-analytics@2.0.2 test /Users/sobolev/Desktop/analytics-module
> npm run lint && jest


> @nuxtjs/google-analytics@2.0.2 lint /Users/sobolev/Desktop/analytics-module
> eslint lib src test

  console.error node_modules/nuxt/lib/core/nuxt.js:166
    Error: [nuxt] Module undefined should export a function
        at ModuleContainer.addModule (/Users/sobolev/Desktop/analytics-module/node_modules/nuxt/lib/core/module.js:113:13)
        at promise.then (/Users/sobolev/Desktop/analytics-module/node_modules/nuxt/lib/common/utils.js:61:61)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:160:7)

Build completed in 12.375s% 

  console.log node_modules/progress-bar-webpack-plugin/node_modules/progress/lib/node-progress.js:179
    

  console.log node_modules/progress-bar-webpack-plugin/node_modules/progress/lib/node-progress.js:179
    

  console.log node_modules/friendly-errors-webpack-plugin/src/output.js:81
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    


  console.log node_modules/friendly-errors-webpack-plugin/src/output.js:103
     DONE  Compiled successfully in 12379ms                               2:40:38 PM

  console.log node_modules/friendly-errors-webpack-plugin/src/output.js:103
    

  console.log node_modules/nuxt/lib/builder/builder.js:485
    Hash: 129f262eedf51f4aaa86
    Version: webpack 3.12.0
    Time: 12379ms
                                      Asset       Size  Chunks             Chunk Names
        pages/index.d1944e94f3fa94fff074.js  410 bytes       0  [emitted]  pages/index
    layouts/default.cc1854ad9412fd1849aa.js  326 bytes       1  [emitted]  layouts/default
             vendor.a6e76812813970cf0d37.js     144 kB       2  [emitted]  vendor
                app.07d83a8721058ce9e65d.js      26 kB       3  [emitted]  app
           manifest.129f262eedf51f4aaa86.js    1.47 kB       4  [emitted]  manifest
                                   LICENSES  584 bytes          [emitted]  
     + 3 hidden assets

 FAIL  test/module.test.js (17.236s)
  Module
    ✕ render (30ms)

  ● Module › render

    StatusCodeError: 404 - "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot GET /</pre>\n</body>\n</html>\n"
      
      at new StatusCodeError (node_modules/request-promise-core/lib/errors.js:32:15)
      at Request.plumbing.callback (node_modules/request-promise-core/lib/plumbing.js:104:33)
      at Request.RP$callback [as _callback] (node_modules/request-promise-core/lib/plumbing.js:46:31)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1163:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        17.878s
Ran all test suites.
  console.log node_modules/nuxt/lib/builder/builder.js:485
    Hash: 0b33a0986a0638a57d72
    Version: webpack 3.12.0
    Time: 604ms
                 Asset    Size  Chunks             Chunk Names
    server-bundle.json  112 kB          [emitted]  

  console.log node_modules/nuxt/lib/core/nuxt.js:126
    
     OPEN  http://localhost:5060
    

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nuxtjs/google-analytics@2.0.2 test: `npm run lint && jest`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @nuxtjs/google-analytics@2.0.2 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!     /Users/sobolev/.npm/_logs/2018-05-15T11_40_40_668Z-debug.log


This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant