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

start Building server... runs forever #14062

Closed
djschilling opened this issue Jun 1, 2022 · 11 comments
Closed

start Building server... runs forever #14062

djschilling opened this issue Jun 1, 2022 · 11 comments

Comments

@djschilling
Copy link

djschilling commented Jun 1, 2022

Environment

Nuxt CLI v3.0.0-rc.3 10:44:31
RootDir: /Users/david/projects/finder/churchtools-finder 10:44:33
Nuxt project info: 10:44:33


  • Operating System: Darwin
  • Node Version: v16.13.2
  • Nuxt Version: 3.0.0-rc.3
  • Package Manager: npm@8.1.2
  • Builder: vite
  • User Config: runtimeConfig, css, build, buildModules, intlify, serverMiddleware, render
  • Runtime Modules: -
  • Build Modules: @intlify/nuxt3@0.2.2

👉 Report an issue: https://github.com/nuxt/framework/issues/new 10:44:33

👉 Suggest an improvement: https://github.com/nuxt/framework/discussions/new

👉 Read documentation: https://v3.nuxtjs.org

Describe the bug

We upgraded to nuxt rc3. First it worked. But now 2 days later without changing anything running nuxi build does not terminate. It just hangs at start Building server...

Here is how it looks:

npm run build

> ChurchTools Finder@0.3.0 build
> nuxi build

Nuxt CLI v3.0.0-rc.3                                                                                                                                                          10:41:34
ℹ Vite client warmed up in 2191ms                                                                                                                                             10:41:41

 WARN  [vite:css] Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.                                                             10:41:43
651|  @media print {
652|  	/* Prevent printers from removing background-images of controls. */
653|  	.leaflet-control {
   |       ^
654|  		-webkit-print-color-adjust: exact;
655|  		color-adjust: exact;


 WARN  [vite:css] Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.                                                             10:41:45
651|  @media print {
652|  	/* Prevent printers from removing background-images of controls. */
653|  	.leaflet-control {
   |       ^
654|  		-webkit-print-color-adjust: exact;
655|  		color-adjust: exact;

ℹ Client built in 10043ms                                                                                                                                                     10:41:49
ℹ Building server...                                                                                                                                                          10:41:49

 WARN  @fortawesome/fontawesome-free doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.


 WARN  reflect-metadata doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.


 WARN  [vite:css] Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.                                                             10:41:50
651|  @media print {
652|  	/* Prevent printers from removing background-images of controls. */
653|  	.leaflet-control {
   |       ^
654|  		-webkit-print-color-adjust: exact;
655|  		color-adjust: exact;

✔ Server built in 2511ms                                                                                                                                                      10:41:51
✔ Generated public .output/public                                                                                                                                       nitro 10:41:51
start Building server...

I can see that esbuild is running and not terminating. Is there a debug flag where i can see more infos?

@danielroe
Copy link
Member

You could try clearing .nuxt and node_modules/.vite, and if that doesn't work, try again with the following config:

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  sourcemap: false,
  nitro: {
    esbuild: {
      options: {
        minify: false
      }
    }
  }
})

@djschilling
Copy link
Author

Thanks for your answer. I tried both but it did't help.

This is what the process looks like:

david@Mac-Studio-von-David ~ % ps aux | grep esbuild
david            69608   0,1  0,0 408628368   1616 s001  S+    5:38pm   0:00.00 grep esbuild
david            69293   0,0  0,1 409219472  48176 s005  S+    5:38pm   0:00.55 /Users/david/projects/work/finder/churchtools-finder/node_modules/esbuild-darwin-arm64/bin/esbuild --service=0.14.42 --ping

And this is how our nuxt.config.ts looks like:

import { defineNuxtConfig } from 'nuxt';

// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
export default defineNuxtConfig({
    runtimeConfig: {
        BASE_URL: process.env.BASE_URL,
        public: {
            MATOMO_URL: process.env.MATOMO_URL
        }
    },
    css: ['~/assets/css/main.css', '~/assets/css/main.scss', '~/assets/css/fa.scss'],
    build: {
        postcss: {
            postcssOptions: require('./postcss.config.js')
        }
    },
    buildModules: ['@intlify/nuxt3'],
    intlify: {
        localeDir: 'locales',
        vueI18n: {
            // You can setting same `createI18n` options here !
            locale: 'de'
        }
    },
    serverMiddleware: [
        { path: '/robots.txt', handler: '~/seo-routes/robots.ts' },
        { path: '/sitemap.txt', handler: '~/seo-routes/sitemap.ts' },
        { path: '/.well-known/apple-app-site-association', handler: '~/seo-routes/appleDomain.ts' },
        '~/src/cron/run-once.ts'
    ],
    sourcemap: false,
  nitro: {
    esbuild: {
      options: {
        minify: false
      }
    }
  }
});

@jshimkoski
Copy link

jshimkoski commented Jun 15, 2022

I'm seeing the same thing in RC 4. The build freezes on start Building server.... Tried the steps provided by @danielroe but they didn't help.

npm run build

> build
> nuxt build

Nuxt CLI v3.0.0-rc.4
ℹ Vite client warmed up in 1070ms

 WARN
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

ℹ Client built in 6702ms
ℹ Building server...
✔ Server built in 3064ms
✔ Generated public .output/public
start Building server...      

Here is how the esbuild process looks:

ps aux | grep esbuild
<omitted_name>       8466   0.0  0.0 408637584   1792 s003  S+    9:57AM   0:00.00 grep esbuild
<omitted_name>       8423   0.0  0.3 409288608 107264 s002  S+    9:56AM   0:01.29 /<omitted_path>/node_modules/esbuild-darwin-arm64/bin/esbuild --service=0.14.43 --ping

Finally, nuxt config:

import { defineNuxtConfig } from 'nuxt'

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
  publicRuntimeConfig: {
    BASE_URL: 'http://localhost:5000'
  },
  css: [
    // Font Awesome
    '@fortawesome/fontawesome-svg-core/styles.css',

    // Provide the Tailwind CSS
    '@/assets/css/main.css',
  ],
  build: {
    transpile: [
      // Font Awesome
      '@fortawesome/vue-fontawesome',
      '@fortawesome/fontawesome-svg-core',
      '@fortawesome/pro-solid-svg-icons',
      '@fortawesome/pro-regular-svg-icons',
      '@fortawesome/pro-light-svg-icons'
    ],
    postcss: {
      postcssOptions: {
        plugins: {
          tailwindcss: {},
          autoprefixer: {},
        },
      },
    },
  },
  vite: {
    server: {
      proxy: {
        '/api': {
          target: 'http://localhost:5000',
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/api/, '')
        },
      }
    }
  }
})

@jshimkoski
Copy link

I got curious so I ran npm run generate just to see how far that process would get and it froze at the Initializing prerenderer step. Not sure if these issue are related but figured I'd add some more info.

npm run generate

> generate
> nuxt generate

Nuxt CLI v3.0.0-rc.4
ℹ Vite client warmed up in 1100ms

 WARN
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

ℹ Client built in 6897ms
ℹ Building server...
✔ Server built in 3144ms
✔ Generated public .output/public
ℹ Initializing prerenderer

@danielroe
Copy link
Member

Would you try the steps here?

@jshimkoski
Copy link

jshimkoski commented Jun 15, 2022

Blowing away my package-lock.json and node_modules then running a fresh npm install fixed the issue for me.

Thank you @danielroe!

@cinob
Copy link
Contributor

cinob commented Jun 16, 2022

Updated nitropack to v0.4.8

@djschilling
Copy link
Author

Updating to v3.0.0-rc.4 fixed the issue for me.

@jamaluddinrumi
Copy link

Blowing away my package-lock.json and node_modules then running a fresh npm install fixed the issue for me.

Thank you @danielroe!

same experience for 5 days, and finally

thank you

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
@AlejandroAkbal
Copy link

@danielroe
Copy link
Member

@AlejandroAkbal This is probably a different issue. See nuxt/cli#169.

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

6 participants