Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

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

Open
lpatmo opened this issue Aug 23, 2020 · 7 comments

Comments

@lpatmo
Copy link

lpatmo commented Aug 23, 2020

New Post:

Problem:
image

Steps to recreate:

  1. Deployed by clicking on the button
  2. Create a new database on FaunaDB
  3. Clone the repo created from deploying
  4. npm install
  5. npm audit fix
  6. Ran $ export FAUNADB_SERVER_SECRET=[KEY]
  7. npm run bootstrap

Running npm run bootstrap caused this error:
image

So I ran netlify link.

That went well, but running npm start next caused the same error:
image

> [email protected] start /Users/lpnotes/Desktop/projects/bc
> netlify dev

◈ Netlify Dev ◈
◈ Injected addon env var:  FAUNADB_ADMIN_SECRET
◈ Injected addon env var:  FAUNADB_CLIENT_SECRET
◈ Empty args assigned, this is an internal Netlify Dev bug, please report your settings and scripts so we can improve
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `netlify dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lpnotes/.npm/_logs/2020-08-25T02_53_25_800Z-debug.log

The full debug log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/12.9.1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/lpnotes/Desktop/projects/bc/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
9 verbose lifecycle [email protected]~start: CWD: /Users/lpnotes/Desktop/projects/bc
10 silly lifecycle [email protected]~start: Args: [ '-c', 'netlify dev' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `netlify dev`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)
13 verbose stack     at EventEmitter.emit (events.js:209:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:209:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/lpnotes/Desktop/projects/bc
16 verbose Darwin 18.7.0
17 verbose argv "/usr/local/Cellar/node/12.9.1/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v12.9.1
19 verbose npm  v6.10.3
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `netlify dev`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Old post:

After clicking on the button to deploy this to Netlify and creating the FaunaDB key, we were getting the following error:

image

Can I add to the README.md the instruction to install the netlify CLI? https://docs.netlify.com/cli/get-started/

@lpatmo
Copy link
Author

lpatmo commented Aug 23, 2020

Update: getting this error:

image

@lpatmo lpatmo changed the title "Netlify not recognized as an internal or external command" ◈ Empty args assigned, this is an internal Netlify Dev bug, please report your settings and scripts so we can improve Aug 25, 2020
@hoop71
Copy link

hoop71 commented Sep 4, 2020

I am getting the same error but after installation and on npm start

image

1 verbose cli [
1 verbose cli   '/Users/[name]/.nvm/versions/node/v13.8.0/bin/node',
1 verbose cli   '/Users/[name]/.nvm/versions/node/v13.8.0/bin/npm',
1 verbose cli   'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /Users/[name]/.nvm/versions/node/v13.8.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/[name]/code/fun/wanna-hit/node_modules/.bin:/Users/[name]/.nvm/versions/node/v13.8.0/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/opt/sphinx-doc/bin
9 verbose lifecycle [email protected]~start: CWD: /Users/[name]/code/fun/wanna-hit
10 silly lifecycle [email protected]~start: Args: [ '-c', 'netlify dev' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `netlify dev`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/[name]/.nvm/versions/node/v13.8.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:321:20)
13 verbose stack     at ChildProcess.<anonymous> (/Users/[name]/.nvm/versions/node/v13.8.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:321:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/[name]/code/fun/wanna-hit
16 verbose Darwin 19.6.0
17 verbose argv "/Users/[name]/.nvm/versions/node/v13.8.0/bin/node" "/Users/[name]/.nvm/versions/node/v13.8.0/bin/npm" "start"
18 verbose node v13.8.0
19 verbose npm  v6.13.6
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `netlify dev`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@av1nash
Copy link

av1nash commented Sep 13, 2020

Getting same error message.
c:\Workplace\DevOps\netlify-faunadb-example>npm start

[email protected] start c:\Workplace\DevOps\netlify-faunadb-example
netlify dev

◈ Netlify Dev ◈
◈ Empty args assigned, this is an internal Netlify Dev bug, please report your settings and scripts so we can improve
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: netlify dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

@domnantas
Copy link

I had the same problem. Making the following changes fixed the issue:

// package.json

   "scripts": {
     "bootstrap": "netlify dev:exec node ./scripts/bootstrap-fauna-database.js",
     "docs": "md-magic --path '**/*.md' --ignore 'node_modules'",
-    "start": "netlify dev",
+    "dev": "netlify dev",
+    "start": "react-scripts start",
     "prebuild": "echo 'setup faunaDB' && npm run bootstrap",
     "build": "react-scripts build"
   },
// netlify.toml
 
 [dev]
   # Local dev command. A.k.a npm start
-  command = "react-scripts start"
+  command = "npm start"

@ctjlewis
Copy link

It seems like the project cannot run as-is due to the CLI detecting the netlify dev calls and throwing an error. The CLI logic is correct, and @domnantas provided the appropriate fix to prevent the CLI from attempting to recursively call itself.

See also: netlify/cli#1798

ctjlewis added a commit to ctjlewis/netlify-faunadb-example that referenced this issue Jan 24, 2021
The CLI detects different framework commands in package.json, and will throw
if it detects `netlify dev` in the default script while running `netlify dev`
in order to avoid recursively calling itself.

By removing the `netlify dev` from the `start` and `dev` scripts and adjusting
the CLI logic to recognize `netlify dev:exec` as distinct from `netlify:dev`,
we can get this project working as expected.

Also updates package.json dependencies.

see also:
netlify#26
netlify/cli#1798
ctjlewis added a commit to ctjlewis/netlify-faunadb-example that referenced this issue Jan 24, 2021
The CLI detects different framework commands in package.json, and will throw
if it detects `netlify dev` in the default script while running `netlify dev`
in order to avoid recursively calling itself.

By removing the `netlify dev` from the `start` and `dev` scripts and adjusting
the CLI logic to recognize `netlify dev:exec` as distinct from `netlify:dev`,
we can get this project working as expected.

Also updates package.json dependencies.

see also:
netlify#26
netlify/cli#1798
@stevenfowler16
Copy link

Any update on this? I can't get this to work. Receiving the same error

@stevenfowler16
Copy link

Interestingly enough I updated faunadb and then the above fixes started working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants