-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Add option to pass --inspect flag to enable server-side debugging #3294
Changes from 2 commits
f1fbab2
7524b14
ac24d10
cf3da27
5392dd0
4d80271
7db8138
52a0951
53cdfaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/env node | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you really need to change this? While I have never seen anyone running There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like this change their, but I haven't found a way to pass the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @auchenberg having this shebang doesn't require you use them. Just leave shebang even if you are going to run them from |
||
import { resolve, join } from 'path' | ||
import { existsSync } from 'fs' | ||
import parseArgs from 'minimist' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/env node | ||
console.log('`next init` is not supported anymore. These community projects provide the same functionality as `next init` with additional features: http://npmjs.com/next-init and http://npmjs.com/create-next-app.') | ||
|
||
process.exit(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
bin
? =const bin = join(__dirname, 'next-' + cmd)
🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I've changed the scripts to be regular JavaScript files, that doesn't contain
#!/usr/bin/env node
as we need to launch Node with the--inspect
flag and having the files as a shell script doesn't allow that.So the change here is the that we spawn a child process like
node --inspect <path to next-dev>