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

normalize paths from fs watcher #38

Merged
merged 3 commits into from
Dec 27, 2023
Merged

Conversation

edivados
Copy link
Contributor

@edivados edivados commented Dec 23, 2023

  • Be on Windows
  • Run pnpm -F example-hackernews run dev in solid start
  • Edit [...stories].tsx

Something to do with server functions I think but in any case it's probably a good idea to normalize the paths received from the fs watcher.

Edit: Moved the normalization to the fs-router in case other code modifies the routes in the future.

14:09:40 [vite] hmr update /@id/C:/Users/Davide/Desktop/solid-start/examples/hackernews/src/routes/[...stories].tsx?pick=default&pick=$css
14:09:40 [vite] page reload src/routes/[...stories].tsx
outes[...stories].tsx?pick=route (resolved id: C:UsersDavideDesktopsolid-startexampleshackernewssroutes[...stories].tsx?pick=route) in C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js. Does the file exist?
14:09:41 [vite] Error when evaluating SSR module /@fs/C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routeoutes[...stories].tsx?pick=route"videDesktopsolid-startexampleshackernewssrc
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
    at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

14:09:41 [vite] Error when evaluating SSR module /@fs/C:/Users/Davide/Desktop/solid-start/packages/start/shared/routes.ts: failed to import "/@fs/C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js" 
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
    at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

14:09:41 [vite] Error when evaluating SSR module /@fs/C:/Users/Davide/Desktop/solid-start/packages/start/server/handler.tsx: failed to import "/@fs/C:/Users/Davide/Desktop/solid-start/packages/start/shared/routes.ts"
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
    at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

14:09:41 [vite] Error when evaluating SSR module /@fs/C:/Users/Davide/Desktop/solid-start/packages/start/server/index.tsx: failed to import "/@fs/C:/Users/Davide/Desktop/solid-start/packages/start/server/handler.tsx"
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
    at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

14:09:41 [vite] Error when evaluating SSR module /src/entry-server.tsx: failed to import "/@fs/C:/Users/Davide/Desktop/solid-start/packages/start/server/index.tsx"
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
    at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

14:09:41 [vite] Error when evaluating SSR module #vinxi/handler/ssr: failed to import "/src/entry-server.tsx"
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
    at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'    at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
    ... 2 lines matching cause stack trace ...
    at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9) {
outes[...stories].tsx?pick=route' imported from 'C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js'      at nodeImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56088:25)
      at ssrImport (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:30)
      at eval (C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vinxi/lib/routes.js:5:37)
      at async instantiateModule (file:///C:/Users/Davide/Desktop/solid-start/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9) {       
    code: 'ERR_MODULE_NOT_FOUND'
  },
  statusCode: 500,
  fatal: false,
  unhandled: true,
  statusMessage: undefined,
  data: undefined
}

Copy link

codesandbox bot commented Dec 23, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Dec 23, 2023

🦋 Changeset detected

Latest commit: cbba2d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 29 packages
Name Type
vinxi Patch
@vinxi/plugin-directives Patch
@vinxi/react-server Patch
@vinxi/router Patch
@vinxi/server-components Patch
@vinxi/server-functions Patch
example-react-server Patch
app Patch
example-react-spa-basic Patch
react-spa-mdx Patch
react-spa-tanstack-router-app Patch
example-react-spa-tanstack-router-app Patch
react-ssr-basic-cloudflare Patch
react-ssr-basic Patch
react-ssr-tanstack-router-app Patch
react-ssr-wouter Patch
solid-spa-basic Patch
solid-ssr-basic Patch
example-ssr-solid-router Patch
example-ssr-solid-start Patch
example-vanilla-empty Patch
example-vanilla-partyroom Patch
example-vanilla-spa Patch
example-vanilla-stack Patch
example-vanilla-trpc Patch
test-react-rsc Patch
test-react-srv-fn Patch
react-ssr-test-fs Patch
test-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vinxi-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2023 6:22pm

@nksaraf nksaraf merged commit 858a9b8 into nksaraf:main Dec 27, 2023
5 checks passed
@edivados edivados deleted the norm-fs-watcher branch December 27, 2023 07:58
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

Successfully merging this pull request may close these issues.

2 participants