nodejs记录:liunx服务器使用dev运行项目出现node:events:491错误的解决办法

当前文章收录状态:
未收录

我使用的是vue3,报这个错的原因是因为liunx无法调用浏览器打开项目。

解决办法:

server: {
port: viteEnv.VITE_PORT,
open: false, //将此设置改为false
host: '0.0.0.0',
proxy: {
'/api/v1': {
target: 'http://localhost:9999/',
changeOrigin: true,
ws: true,
},
},
},
server: {
            port: viteEnv.VITE_PORT,
            open: false, //将此设置改为false
            host: '0.0.0.0',
            proxy: {
                '/api/v1': {
                    target: 'http://localhost:9999/',
                    changeOrigin: true,
                    ws: true,
                },
            },
        },
server: { port: viteEnv.VITE_PORT, open: false, //将此设置改为false host: '0.0.0.0', proxy: { '/api/v1': { target: 'http://localhost:9999/', changeOrigin: true, ws: true, }, }, },

 

 

© 版权声明
THE END
我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=270198dipw4ko
点赞23赞赏 分享
I only wish to face the sea, with spring flowers blossoming.
我只愿面朝大海,春暖花开
评论 抢沙发

请登录后发表评论

    暂无评论内容