https://github.com/baturali/nuxt-dev-debug
Clone the project and run>
yarn
yarn run dev-debug
The debugging process should work as expected.
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.
Any idea why this happens?
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:
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:
Issues that are labeled as pending
will not be automatically marked as stale.
I have the same problem on Windows 10.
@Manieck https://github.com/nuxt/nuxt.js/issues/5308#issuecomment-482698759
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.