Answer the question
In order to leave comments, you need to log in
How to properly adapt package.json to run in windows 10 home?
...
"scripts": {
"dev": "API_URL='https://localhost:8000/api/v1.1/' nuxt",
"build": "NODE_ENV=production nuxt build",
"start": "NODE_ENV=production nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"fix-code": "prettier-eslint --write 'src/**/*.{js,jsx}' ",
"fix-styles": "prettier-stylelint --write 'src/**/*.{css,scss}' "
},
npm run dev
, but it gives me that"API_URL" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
Answer the question
In order to leave comments, you need to log in
Thanks, Kira, for a working version, but I would like to find a solution without installing additional plugins.
set API_URL didn't work in my case. The terminal just outputs this line:
, and vue won't start.
package.json
{
"scripts": {
"dev": "dotenv -- nuxt",
"build": "dotenv -- nuxt build",
"start": "dotenv -- nuxt start",
"generate": "dotenv -- nuxt generate"
},
"devDependencies": {
"dotenv-cli": "^3.1.0"
}
}
API_URL=https://localhost:8000/api/v1.1/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question