Cli: Empty args assigned, this is an internal Netlify Dev bug, please report your settings and scripts so we can improve

Created on 28 Sep 2020  路  5Comments  路  Source: netlify/cli

Describe the bug

Netlify dev doesn't work with latest version netlify-cli/2.64.1 win32-x64 node-v12.13.1

Configuration

netlify.toml:

[dev]
  functions = "src/lambda_functions"
  port = 4000 #port netlify dev runs on
  command = 'yarn develop'

package.json:

{
  "name": "rmsv",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "develop": "netlify dev",
    "build": "gatsby build",
    "clean": "gatsby clean",
    "format": "prettier --write src/**/*.{js,jsx}",
    "serve": "gatsby serve",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
  },
  "dependencies": {
    "@simplur/micro-site": "1.0.4",
    "gatsby": "^2.24.63",
    "netlify-lambda": "^2.0.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1"
  }
}
System:
    OS: Windows 10 10.0.18363
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Memory: 4.89 GB / 15.89 GB
  Binaries:
    Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD

Expected behavior

Netlify Dev should run locally.

CLI Output

image

bug

Most helpful comment

I have fixed the issue by adding "start": "gatsby develop", into package.json and set netlify command to yarn start

All 5 comments

Same for netlify-cli/2.64.1 darwin-x64 node-v12.18.4

I have fixed the issue by adding "start": "gatsby develop", into package.json and set netlify command to yarn start

Yeap, the issue is that command args are empty here https://github.com/netlify/cli/blob/master/src/utils/detect-server.js#L211

wrapping command in a npm task is a workaround and also worked for me. Thanks!

Any update on a fix for this?

@zwallacedev as the original issue was closed, do you mind opening a new one with your configuration?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RaeesBhatti picture RaeesBhatti  路  4Comments

bendg25 picture bendg25  路  5Comments

jasikpark picture jasikpark  路  5Comments

rabbah picture rabbah  路  3Comments

sw-yx picture sw-yx  路  4Comments