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

No helpful logs in console when using nuxt bridge on a fresh nuxt 2 project. #206

Closed
ayalon opened this issue Nov 4, 2021 · 5 comments
Closed
Labels
bridge bug Something isn't working

Comments

@ayalon
Copy link

ayalon commented Nov 4, 2021

Environment

Nuxt project info: 17:26:23


  • Operating System: Linux
  • Node Version: v16.13.0
  • Nuxt Version: 2.16.0-27266415.3ab12f9f
  • Package Manager: npm@8.1.0
  • Bundler: Webpack
  • User Config: head, css, plugins, components, buildModules, modules, axios, build, bridge
  • Runtime Modules: @nuxtjs/axios@5.13.6
  • Build Modules: @nuxt/typescript-build@2.1.0

Describe the bug

I created a new nuxt2 project with npx create-nuxt-app nuxt2-app. Then I followed the documentation and upgraded it to "nuxt-edge": "latest" added the bridge module and did the suggested config changes:

https://v3.nuxtjs.org/getting-started/bridge/

When doing a npm run dev i have no output except this:

> nuxt2-app@1.0.0 dev
> nuxi dev
Nuxt CLI v3.0.0-27267163.9b8d44d                                                                           
 > Local:    http://localhost:3000/
 > Network:  http://172.28.167.215:3000/

If I do a nuxt build I have this output:

> nuxt2-app@1.0.0 build
> nuxi build
Nuxt CLI v3.0.0-27267163.9b8d44d

Is it really true, that I have no error logs and no feedback at all? Not even a file change triggers a message in the command line.

Reproduction

Here is a full repo, that show, that NO console output from the plugin is generated. I added the most simple plugin and called some console output but it is not displayed at all.

https://stackblitz.com/github/ayalon/nuxt2-brigde-console-log

Additional context

Is there an option to show the usual logs as in nuxt2?

Logs

No response

@ayalon
Copy link
Author

ayalon commented Nov 5, 2021

Reproduction:
Here is a full repo, that show, that NO console output from the plugin is generated. I added the most simple plugin and called some console output but it is not displayed at all.

https://stackblitz.com/github/ayalon/nuxt2-brigde-console-log

@danielroe
Copy link
Member

@ayalon Your reproduction was not actually using Bridge, just nuxi. Make sure to follow this section of the migration guide.

import { defineNuxtConfig } from '@nuxt/bridge'

export default defineNuxtConfig({
  // ...
})

Then, hopefully you'll see this:
CleanShot 2021-11-05 at 13 38 40@2x

@ayalon
Copy link
Author

ayalon commented Nov 8, 2021

Thanks for the help! This was a mistake on my side.

But I still think, that a lot of console logging is missing. We have a module that does a lot of logs but non of them are displayed with nuxt bridge.

I also had a code error in a module but instead of displaying the error, just nothing was displayed. Is there an option to enable logging from nuxt modules and nuxt server middleware plugins with nuxt bridge?

@pi0
Copy link
Member

pi0 commented Nov 9, 2021

@ayalon We had a regression in nuxt-edge (on std-env) that caused hiding most of the logs. Would you mind upgrading to latest nuxt-edge and recreating lockfile?

@XLordalX
Copy link

This seems to still be happening on the latest version. Only console.error is logging anything.

@pi0 pi0 transferred this issue from nuxt/framework Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants