Nuxt.js: Run dev-debug is not working

Created on 21 Mar 2019  路  9Comments  路  Source: nuxt/nuxt.js

Version

v2.5.0

Reproduction link

https://github.com/baturali/nuxt-dev-debug

Steps to reproduce

Clone the project and run>
yarn
yarn run dev-debug

What is expected ?

The debugging process should work as expected.

What is actually happening?

I receive the error below:

$ yarn run dev-debug
yarn run v1.13.0
$ node --inspect node_modules/.bin/nuxt
Debugger listening on ws://127.0.0.1:9229/1a9f338a-2040-4011-84c5-88f7b37e522e
For help, see: https://nodejs.org/en/docs/inspector
C:UsersuserDesktopDevdebug-trynode_modules.binmd5-0e7fc2adca55cdbc001e79864956217dnuxt:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^

SyntaxError: missing ) after argument list
at Module._compile (internal/modules/cjs/loader.js:743:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
at internal/main/run_main_module.js:21:11
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Additional comments?

Any idea why this happens?

This bug report is available on Nuxt community (#c8880)
bug-report stale

Most helpful comment

Actually, on Windows, the nuxt executable was ./node_modules/.bin/nuxt.cmd.
On MacOS it's ./node_modules/.bin/nuxt.
If you take a look the content of these two files, despite lines and syntax which is platform specific, then you'll find out it's executing ./node_modules/nuxt/bin/nuxt.js.

So, just simply change your dev-debug script to node --inspect ./node_modules/nuxt/bin/nuxt then you have no problem debugging your code on both platforms.

All 9 comments

Unable to reproduce it on macOS

Unable to reproduce it on macOS

Its just starter template of Nuxt.js me only added the dev-debug script on package.json.
So you can try to build a new project with following these steps: https://nuxtjs.org/guide/installation and
add that line on package.json file in scripts > "dev-debug": "node --inspect node_modules/.bin/nuxt"

I have the same problem on Windows 10.

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.

Dev-debug works fine on Mac with v2.5.0 but still not on Windows.

Actually, on Windows, the nuxt executable was ./node_modules/.bin/nuxt.cmd.
On MacOS it's ./node_modules/.bin/nuxt.
If you take a look the content of these two files, despite lines and syntax which is platform specific, then you'll find out it's executing ./node_modules/nuxt/bin/nuxt.js.

So, just simply change your dev-debug script to node --inspect ./node_modules/nuxt/bin/nuxt then you have no problem debugging your code on both platforms.

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.

I have the same problem on Windows 10.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimsg picture vadimsg  路  3Comments

VincentLoy picture VincentLoy  路  3Comments

jaredreich picture jaredreich  路  3Comments

uptownhr picture uptownhr  路  3Comments

maicong picture maicong  路  3Comments