Nuxt.js: npm run dev: Exit status 3221225725

Created on 14 Apr 2019  路  5Comments  路  Source: nuxt/nuxt.js

Version

v2.6.1

Reproduction link

https://github.com/vonBrax/nuxt-esm-bug

Steps to reproduce

OS: MS Windows 10 Pro 10.0.17763 64-bits

From the provided repo:

  1. git clone https://github.com/vonBrax/nuxt-esm-bug
  2. cd nuxt-esm-bug
  3. npm install
  4. npm run dev

From scratch:

  1. npx create-nuxt-app nuxt-esm-bug (just default options)
  2. cd nuxt-esm-bug
  3. npm i stylelint stylelint-webpack-plugin
  4. require stylelint-webpack-plugin inside nuxt.config.js (https://github.com/webpack-contrib/stylelint-webpack-plugin#getting-started):
    -- const StyleLintPlugin = require('stylelint-webpack-plugin') - not even necessary to push it to config.plugins
  5. npm run dev

What is expected ?

normally compile the application and start dev server

What is actually happening?

Process exit with error 3221225725 (stack overflow):

npm ERR! code ELIFECYCLE
npm ERR! errno 3221225725
npm ERR! [email protected] dev: nuxt
npm ERR! Exit status 3221225725
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Additional comments?

Tracking down the bug locally in the built package inside node_modules the offending line seems to be this one:

  • node_modules/@nuxt/cli/dist/cli-chunk2.js: options = (nuxtConfigFile.endsWith('.ts') ? require(nuxtConfigFile) : esm(module, esmOptions)(nuxtConfigFile)) || {};

And mapping it to the source code it seems to be here: https://github.com/nuxt/nuxt.js/blob/dev/packages/cli/src/utils/config.js#L28

Apparently this is a known issue from the esm package (< v3.20.1) when used in conjuction with some other packages like stylelint or node-sass running on windows machines. The issue is described here: https://github.com/standard-things/esm/issues/745

As stated in https://github.com/standard-things/esm/issues/745#issuecomment-477851101, upgrading esm to 3.20.1 seems to fix the issue.

I tested upgrading the package locally in my machine and indeed the issue is gone.

This bug report is available on Nuxt community (#c9042)
bug-report pending waiting for dependency

Most helpful comment

we cant update esm to anything higher than 3.20 because of https://github.com/standard-things/esm/issues/773
So when a new version of esm will be released then we update

All 5 comments

we cant update esm to anything higher than 3.20 because of https://github.com/standard-things/esm/issues/773
So when a new version of esm will be released then we update

Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

Looks like the update is coming soon ( https://github.com/standard-things/esm/commit/9432fad0d712cdcb434e655258f76bcbcc149747 )

Can this be closed @manniL ?

I would say so :relaxed:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lazycrazy picture lazycrazy  路  3Comments

danieloprado picture danieloprado  路  3Comments

bimohxh picture bimohxh  路  3Comments

pehbehbeh picture pehbehbeh  路  3Comments

jaredreich picture jaredreich  路  3Comments