Netlify site name: buzondevoz.netlify.app
12:23 $ nuxt -v @nuxt/cli v2.12.2
12:23 $ netlify -v netlify-cli/2.48.0 darwin-x64 node-v12.16.2
Just getting started with
netlify dev, I think it is an excellent tool but I need to make it work for me
Right now this is what I get if I run it in a nuxt app:
$ netlify dev:
◈ Netlify Dev ◈ ◈ Overriding the following env variables with .env file: BASE_URL,DB_URL,DB_NAME,DB_COLLECTION ◈ Starting Netlify Dev with nuxt ◈ Function builder netlify-lambda detected: Running npm script deploy › Warning: ◈ This is a beta feature, please give us feedback on how to improve at https://github.com/netlify/cli/ Usage: npm <command> where <command> is one of: access, adduser, audit, bin, bugs, c, cache, ci, cit, clean-install, clean-install-test, completion, config, create, ddp, dedupe, deprecate, dist-tag, docs, doctor, edit, explore, fund, get, help, help-search, hook, i, init, install, install-ci-test, install-test, it, link, list, ln, login, logout, ls, org, outdated, owner, pack, ping, prefix, profile, prune, publish, rb, rebuild, repo, restart, root, run, run-script, s, se, search, set, shrinkwrap, star, stars, start, stop, t, team, test, token, tst, un, uninstall, unpublish, unstar, up, update, v, version, view, whoami npm <command> -h quick help on <command> npm -l display full usage info npm help <term> search for help on <term> npm help npm involved overview Specify configs in the ini-formatted file: /Users/amartinez/.npmrc or on the command line via: npm <command> --key value Config info can be viewed via: npm help config firstname.lastname@example.org /Users/amartinez/.nvm/versions/node/v12.16.2/lib/node_modules/npm
So I went ahead and added a
[dev] section in my
[build] functions = "lambda" command = "npm run deploy" [dev] framework = "nuxt"
To what the CLI says:
12:32 $ netlify dev ◈ Netlify Dev ◈ ◈ Overriding the following env variables with .env file: BASE_URL,DB_URL,DB_NAME,DB_COLLECTION Error: Unsupported value provided for "framework" option in config at module.exports.serverSettings (~/.nvm/versions/node/v12.16.2/lib/node_modules/netlify-cli/src/utils/detect-server.js:59:30) at DevCommand.run (~/.nvm/versions/node/v12.16.2/lib/node_modules/netlify-cli/src/commands/dev/index.js:413:26) at DevCommand._run (~/.nvm/versions/node/v12.16.2/lib/node_modules/netlify-cli/node_modules/@oclif/command/lib/command.js:42:31) at async Config.runCommand (~/.nvm/versions/node/v12.16.2/lib/node_modules/netlify-cli/node_modules/@oclif/config/lib/config.js:172:9) at async Main.run (~/.nvm/versions/node/v12.16.2/lib/node_modules/netlify-cli/node_modules/@oclif/command/lib/main.js:21:9) at async Main._run (~/.nvm/versions/node/v12.16.2/lib/node_modules/netlify-cli/node_modules/@oclif/command/lib/command.js:42:20)
It is until I add a
command in the
.toml file that it runs:
[build] functions = "lambda" command = "npm run deploy" [dev] command = "npm run dev"
It now renders the following on
I think it is reloading the application “fine” if I only edit text, but somehow all my JS functionality and CSS are gone. (Using Vuetify FWIW)
If I run the project “standalone” (with
$ npm run dev) it works fine. I can also deploy both the site as well as the function I wrote without problem. It’s just that I can’t run the environment locally.
So, I am hesitant to tackle this as a Nuxt issue, but willing to take it to that project if
netlify dev isn’t at fault here.
Can anyone tell me if I am missing something obvious here?
Or how can I make my site work under
netlify dev and be able to test the functions locally without having to build and deploy them every time on the remote.
Thank you in advance!