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

Route path resolution of starters/react-base not working in Windows #150

Open
2 tasks done
rondonjon opened this issue Apr 3, 2024 · 0 comments
Open
2 tasks done

Comments

@rondonjon
Copy link

rondonjon commented Apr 3, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.26.2

Plugin version

0.6.0

Node.js version

21.7.1

Operating system

Windows

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

11

Description

dev script fails in Windows and shows:

09:11:01 [vite] Pre-transform error: Failed to load url ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx (resolved id: ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx) in /:routes.js. Does the file exist?
09:11:01 [vite] Error when evaluating SSR module /:routes.js: failed to import "./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx"
|- Error: Failed to load url ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx (resolved id: ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx) in /:routes.js. Does the file exist?
    at loadAndTransform (file:///C:/Users/.../fastify-vite/starters/react-base/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:53848:21)
    at async instantiateModule (file:///C:/Users/.../fastify-vite/starters/react-base/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:54902:10)

09:11:01 [vite] Error when evaluating SSR module C:\Users\se\Documents\vscode\fastify-vite\starters\react-base\client\index.js: failed to import "/:routes.js"
|- Error: Failed to load url ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx (resolved id: ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx) in /:routes.js. Does the file exist?
    at loadAndTransform (file:///C:/Users/.../fastify-vite/starters/react-base/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:53848:21)
    at async instantiateModule (file:///C:/Users/.../fastify-vite/starters/react-base/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:54902:10)

node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^

Error: Failed to load url ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx (resolved id: ./Users/.../fastify-vite/starters/react-base/C:/Users/.../fastify-vite/starters/react-base/client/pages/index.jsx) in /:routes.js. Does the file exist? 
    at loadAndTransform (file:///C:/Users/.../fastify-vite/starters/react-base/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:53848:21)
    at async instantiateModule (file:///C:/Users/.../fastify-vite/starters/react-base/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:54902:10) {
  code: 'ERR_LOAD_URL'
}

Node.js v21.7.1

Could this be related to #144 and #141 ?

Steps to Reproduce

  • clone repository
  • cd to react-base
  • install dependencies
  • npm run dev

Expected Behavior

Should resolve route paths

@rondonjon rondonjon changed the title starters/react-base not working in Windows Route path resolution of starters/react-base not working in Windows Apr 3, 2024
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