Giter VIP home page Giter VIP logo

v1-compat-utils's Introduction

v1-compat-utils's People

Contributors

brophdawg11 avatar chaance avatar dependabot[bot] avatar github-actions[bot] avatar jacob-ebey avatar machour avatar markdalgleish avatar mcansh avatar michaeldeboey avatar ryanflorence avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

v1-compat-utils's Issues

Bug: Route ID Collision difference from v1 routes

As far as I understand it this should be a valid layout v1 convention:

  • auth
    • login.tsx site.com/login.tsx
  • dashboard
    • index.tsx site.com/
    • about.tsx site.com/about
  • __auth.tsx
  • __dashboard.tsx

However when using this package to keep compatibility to move to v2 elsewhere we get an error:

Screenshot 2023-10-30 at 11 24 22

1.16.0 / 1.16.1 / 1.17.0 : @remix-run/v1-route-convention do not save new route

What version of Remix are you using?

1.17.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

  • Install 1.17.0
  • Configure v2_routeConvention with @remix-run/v1-route-convention
  • Run project
  • Add a route
  • After a very long rebuild time (issue already created before) the route isn't registered

Precision : Do not use the new dev server but the historic one.

Expected Behavior

The route is registered and accessible without full reload of dev server.

Actual Behavior

The route is not registered.

Dependencies of v1-meta and v1-route-convention block upgrade to v2

What version of Remix are you using?

2.0.0 (or trying to)

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

npx upgrade-remix 2.0.0

On a 1.19.3 project with v1-meta and v1-route-convention both installed.

Expected Behavior

Upgrade goes ahead.

Actual Behavior

npm install fails:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: reset-apollo@undefined
npm WARN Found: @remix-run/[email protected]
npm WARN node_modules/@remix-run/dev
npm WARN   peer @remix-run/dev@"^1.15.0" from @remix-run/[email protected]
npm WARN   node_modules/@remix-run/v1-route-convention
npm WARN     @remix-run/v1-route-convention@"^0.1.2" from the root project
npm WARN   1 more (the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @remix-run/dev@"^1.15.0" from @remix-run/[email protected]
npm WARN node_modules/@remix-run/v1-route-convention
npm WARN   @remix-run/v1-route-convention@"^0.1.2" from the root project
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @remix-run/[email protected]
npm ERR! Found: @remix-run/[email protected]
npm ERR! node_modules/@remix-run/react
npm ERR!   @remix-run/react@"2.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @remix-run/react@"^1.15.0" from @remix-run/[email protected]
npm ERR! node_modules/@remix-run/v1-meta
npm ERR!   @remix-run/v1-meta@"^0.1.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @remix-run/[email protected]
npm ERR! node_modules/@remix-run/react
npm ERR!   peer @remix-run/react@"^1.15.0" from @remix-run/[email protected]
npm ERR!   node_modules/@remix-run/v1-meta
npm ERR!     @remix-run/v1-meta@"^0.1.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

v1-route-convention working with unstable_vitePlugin

Hi,
it seems the v1-route-convention package is causing problems when using the unstable_vitePlugin (see remix-run/remix#8585).
I just spend half a day figuring out why the local dev server was stopping unexpectedly and after removing the v1-route-convention package (as described in the above issue it finally starts, but the project is obviously broken now as we haven't migrated to the v2 route convention yet.
Before we do that however I was wondering if there are any plans on making the package compatible with the vitePlugin?

Error when attemping to use V1 Routes package: Error: Error loading Remix config at remix.config.js

Created a repo to reproduce here:
https://github.com/cliffordfajardo/remix_express_v1_to_v2_routes_bug

Steps to Reproduce

  1. Create a Remix app using V1** (I chose the express template in my repo)
  1. Update all @remix-run/* dependencies to version 2.0.1
  2. Add @remix-run/v1-route-convention package to continue using V1 routes
  3. Update remix.config.js to use @remix-run/v1-route-convention package
  4. Run npm run dev & the error will appear
๐Ÿ’ฟ  remix dev

Error: Error loading Remix config at /Users/cfajardo/Desktop/remix_express_v1_to_v2_routes_bug/remix.config.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/cfajardo/Desktop/remix_express_v1_to_v2_routes_bug/node_modules/@remix-run/dev/dist/config/routes' imported from /Users/cfajardo/Desktop/remix_express_v1_to_v2_routes_bug/node_modules/@remix-run/v1-route-convention/dist/index.mjs
Did you mean to import @remix-run/dev/dist/config/routes.js?
    at Object.readConfig (/Users/cfajardo/Desktop/remix_express_v1_to_v2_routes_bug/node_modules/@remix-run/dev/dist/config.js:72:13)
    at async Object.dev (/Users/cfajardo/Desktop/remix_express_v1_to_v2_routes_bug/node_modules/@remix-run/dev/dist/cli/commands.js:179:18)
    at async Object.run (/Users/cfajardo/Desktop/remix_express_v1_to_v2_routes_bug/node_modules/@remix-run/dev/dist/cli/run.js:192:7)

NOTE: all of these steps have been applied is in the bug reproduction repo:
https://github.com/cliffordfajardo/remix_express_v1_to_v2_routes_bug

Issues with the new esm support

I'm in the process of upgrading my project to ESM but am running into this issue:

Cannot find module 'node_modules\@remix-run\dev\dist\config\routes' imported from node_modules\@remix-run\v1-route-convention\dist\index.mjs

In my remix.config.js I import it like this: import { createRoutesFromFolders } from '@remix-run/v1-route-convention';

It worked fine in cjs land but now I'm stuck.

Error: Error loading Remix config at remix.config.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'node_modules\@remix-run\dev\dist\config\routes' imported from node_modules\@remix-run\v1-route-convention\dist\index.mjs
Did you mean to import @remix-run/dev/dist/config/routes.js?
    at Object.readConfig (node_modules\@remix-run\dev\dist\config.js:76:13)
    at async Object.watch (node_modules\@remix-run\dev\dist\cli\commands.js:216:78)
    at async Object.run (node_modules\@remix-run\dev\dist\cli\run.js:498:7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.