fastify / fastify-dx

Archived
900 stars 42 forks source link

Error [ERR_MODULE_NOT_FOUND] when running npm run serve (solid-ts) #40

Closed steverandy closed 2 years ago

steverandy commented 2 years ago

Prerequisites

Fastify version

3.29.1

Plugin version

No response

Node.js version

16

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

12.4

Description

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/steve/Downloads/fastify-dx-main/starters/solid-ts/client/dist/server/index.ts' imported from /Users/steve/Downloads/fastify-dx-main/starters/solid-ts/node_modules/fastify-vite/mode/production.js
    at __node_internal_captureLargerStackTrace (node:internal/errors:465:5)
    at new NodeError (node:internal/errors:372:5)
    at finalizeResolution (node:internal/modules/esm/resolve:437:11)
    at moduleResolve (node:internal/modules/esm/resolve:1009:10)
    at defaultResolve (node:internal/modules/esm/resolve:1218:11)
    at h (file:///Users/steve/Downloads/fastify-dx-main/starters/solid-ts/node_modules/@esbuild-kit/esm-loader/dist/index.js:1:2231)
    at U (file:///Users/steve/Downloads/fastify-dx-main/starters/solid-ts/node_modules/@esbuild-kit/esm-loader/dist/index.js:1:1350)
    at h (file:///Users/steve/Downloads/fastify-dx-main/starters/solid-ts/node_modules/@esbuild-kit/esm-loader/dist/index.js:1:2387)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ESMLoader.resolve (node:internal/modules/esm/loader:580:24)
    at async ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:7)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Steps to Reproduce

Run npm run build && npm run serve in solid-ts starter project.

Expected Behavior

No response

galvez commented 2 years ago

Thanks for the report! Let me look into that.

galvez commented 2 years ago

This came from a bug in fastify-vite, thanks again for reporting it.

It's fixed now — just update to dependency in package.json and reinstall.