小编Gab*_*ath的帖子

如何修复(节点:12388)[DEP0066] DeprecationWarning:OutgoingMessage.prototype._headers 在 Windows 中已弃用

我是节点的新手。我已经安装了nosejs 版本 v12.4.0、npm 6.9.0、http-server 0.11.1 和 Visual Studio 代码。我想用我的 http-server 打开我的 hello word 项目,它在 Visual Studio 中代码。但我收到以下错误

错误

[2019-06-21T05:20:18.280Z] "GET /" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Chrome/64.0.3282.140 Safari/51637"140 (节点:11596)[DEP0066] 弃用警告:不推荐使用 OutgoingMessage.prototype._headers

我尝试npm install node-gyp来解决标题问题,但没有成功。

我也尝试使用不同的浏览器,例如。chrome, firefox , explore 但没有成功。

    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>
        <h1> Hello Word </h1>
    </body>
    </html>
Run Code Online (Sandbox Code Playgroud)

我希望在任何浏览器中都能看到“Hello Word”。我使用的是 Windows 10。请提供帮助

windows http-headers node.js

18
推荐指数
3
解决办法
5万
查看次数

无法在 nuxt3 中获取动态导入的模块

我正在学习 nuxt3,我一直被这个问题困扰,并且我已经浏览了一些有关此错误的帖子,但所有解决方案都不适合我。我正在开发一个 nuxt3 应用程序,带有来自kevinmarrec/nuxt-pwa-module的 vuetify、Bootstrap 和 pwa 模块。

当我使用 npm run dev 运行应用程序时,一切似乎都开始正常构建,但是在首先加载页面后,我得到了页面“Hello nuxt”的正确视图,但在 2-4 秒内页面更改为:

500 无法获取动态导入的模块:http://localhost:3000/_nuxt/pages/index.vue

我尝试在 Windows 10 和内核:Linux 6.0.0-kali6-amd64 上解决此问题,但没有成功。在这两个平台上我都使用节点 v18.14.1。

索引.vue

      <template>
         <div>
            <h1>Hello nuxt</h1>
       </div>
     </template>
     <script>
        export default { }
     </script>
     <style scoped> </style>
Run Code Online (Sandbox Code Playgroud)

以下是plugins文件夹vuetify.ts文件的配置

     import { createVuetify } from 'vuetify'
     import * as components from 'vuetify/components'
     import * as directives from 'vuetify/directives'

     export default defineNuxtPlugin(nuxtApp => {
          const veutify = createVuetify({
                    ssr: true,
                    components,
                    directives,
            });
      nuxtApp.vueApp.use(veutify) …
Run Code Online (Sandbox Code Playgroud)

node.js progressive-web-apps vuetify.js vuejs3 nuxt3

4
推荐指数
1
解决办法
4696
查看次数

java.time.format.DateTimeParseException:无法在索引 0 处解析文本“10-03-2021”

我试图在 Spring Boot 中使用 DateTimeFormatter 将字符串转换为 Java8 的日期格式,但收到错误 [[java.time.format.DateTimeParseException: Text '10-03-2021' Could not be parsed at index 0]] 。我使用 LocalDate 是因为我希望输出只有日期而没有时间。我的代码做错了什么。

    String date= "10-03-2021"
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEEE, MMM d, yyyy",Locale.forLanguageTag("sw-TZ"));
    LocalDateTime dateTime = LocalDateTime.parse(date, formatter);
    System.out.println(dateTime.format(formatter)); 
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc java-8 spring-boot

2
推荐指数
1
解决办法
3万
查看次数