question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"server is not enabled" error

See original GitHub issue

I’m trying to test the provided example in documentation.

that is:

import { get, setupTest } from '@nuxt/test-utils'

describe('ssr', () => {
  setupTest({ server: true })

  it('renders the index page', async () => {
    const { body } = await get('/')

    expect(body).toContain('<a>A Link</a>')
  })
})

the test fails, with an error of server is not enabled.

server is not enabled

   5 |
   6 |     it('renders the index page', async () => {
>  7 |         const thePage = url('/page')
     |                         ^
   8 |         // is something like 'http://localhost:6840/page'
   9 |         expect(sum(1, 2)).toBe(3);
  10 |     })

i have used the defeat configuration mentioned in the installation.

what I’m I doing wrong exactly?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
andretfcommented, Jun 6, 2022

i have the same issue, log says:

using v0.2.2 from main nuxt monorepo and nuxt v2.15.8

    TypeError: Cannot read property 'sources' of undefined

      at Object.<anonymous> (node_modules/@nuxt/webpack/node_modules/terser-webpack-plugin/dist/index.js:44:18)
      at Object.<anonymous> (node_modules/@nuxt/webpack/node_modules/terser-webpack-plugin/dist/cjs.js:3:16)
      at Object.<anonymous> (node_modules/@nuxt/webpack/dist/webpack.js:33:29)
      at Object.<anonymous> (node_modules/@nuxt/builder/dist/builder.js:23:17)
      at Object.<anonymous> (node_modules/nuxt/dist/nuxt.js:12:17)
      at node_modules/@nuxt/test-utils/dist/index.js:110:57

  ● pdp › pdp page

    server is not enabled

      10 |
      11 |   it("pdp page", async () => {
    > 12 |     const { body } = await get("/products/body-essentials");
         |                            ^
0reactions
vencho-mdpcommented, Feb 19, 2022

Oh, in that case I dunno how to set it up correctly, but migrating was so smooth (the api is literally the same) El sáb, 19 feb 2022 a la(s) 15:54, Sergio Compean @.***) escribió:

I would prefer to run my tests via nuxt test utils. Im unsure why a browser test is failing in my case.

— Reply to this email directly, view it on GitHub https://github.com/nuxt/test-utils/issues/172#issuecomment-1046082836, or unsubscribe https://github.com/notifications/unsubscribe-auth/APXJVXPA6SLYDRM4CPCVNE3U37RPRANCNFSM5OQ3AUEA . You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIX: Remote access to the server is not enabled [Full Guide]
How do I fix the remote access to the server is not enabled? · 1. Modify Windows Firewall settings · 2. Check Allow...
Read more >
How to Fix Remote Access to the Server Is Not Enabled
How to Fix Remote Access to the Server Is Not Enabled ; Solution 2. Check Allow Remote Desktop connections · Win + R...
Read more >
FIX: Remote access to the server is not enabled
What Causes the "Remote access to the server is not enabled" Error? ... This error may occur for several reasons, but the most...
Read more >
How to fix 'remote desktop can't connect to the remote computer'
Remote desktop can't connect to the remote computer” is a common error you'll see while connecting to a remote computer. Here's the fix....
Read more >
Remote access to server is not enabled - TechNet - Microsoft
1) Remote access to the server is not enabled 2) The remote computer is turned off 3) The remote computer is not available...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found