Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve dependency 'node:http' #9944

Open
tocha688 opened this issue Sep 6, 2024 · 0 comments
Open

Cannot resolve dependency 'node:http' #9944

tocha688 opened this issue Sep 6, 2024 · 0 comments

Comments

@tocha688
Copy link

tocha688 commented Sep 6, 2024

const fastify=require("fastify")
const server = fastify()

require("./apple/index")(server)

server.listen({
    port: 8546,
    host: "localhost"
}, (err, adr) => {
    if (err) {
        server.log.error(err)
        return process.exit(1)
    }
    console.log("App Address:", adr)
})

error

×  C:\Codes\xxx\node_modules\fastify\fastify.js:6:21: Cannot resolve dependency 'node:http'
  4 |
  5 | const Avvio = require('avvio')
> 6 | const http = require('node:http')
    |                     ^
  7 | let lightMyRequest
  8 |
  9 | const {
 ELIFECYCLE  Command failed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant