zoukankan      html  css  js  c++  java
  • Nuxt.js端口冲突 Nuxt.js 如何更改端口配置?

    Address localhost:3000 is already in use

    直接在package.json里面去加一段

      "config": {
            "nuxt": {
                "host": "0.0.0.0",
                "port": "3333" //你就写与冲突的端口号不同的就行
            }
        }
    

    完整的

    {
        "name": "firstproject",
        "version": "1.0.0",
        "description": "test",
        "author": "gaby",
        "private": true,
        "scripts": {
            "dev": "nuxt --open",
            "build": "nuxt build",
            "start": "nuxt start",
            "generate": "nuxt generate",
            "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
            "precommit": "npm run lint"
        },
        "dependencies": {
            "axios": "^0.19.2",
            "nuxt": "^2.0.0"
        },
        "devDependencies": {
            "babel-eslint": "^10.0.1",
            "eslint": "^4.19.1",
            "eslint-friendly-formatter": "^4.0.1",
            "eslint-loader": "^2.1.1",
            "eslint-plugin-vue": "^4.0.0"
        },
        "config": {  // here are the changes
            "nuxt": {
                "host": "0.0.0.0",
                "port": "3333"
            }
        }
    }
    
  • 相关阅读:
    3.5——课题选择
    3.8——K-th Substring
    01背包dp
    贪心——IQ
    Secret Project Gym
    快速幂&矩阵快速幂
    用栈非递归实现fib数列
    CodeForces Round #590 (Div 3)
    SQL Server常见问题
    SQL基础函数
  • 原文地址:https://www.cnblogs.com/antyhouse/p/12517088.html
Copyright © 2011-2022 走看看