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

isbot v4 breaking change in templates and hidden files #8407

Closed
alexanderson1993 opened this issue Jan 2, 2024 · 10 comments · Fixed by #8385 or #8415
Closed

isbot v4 breaking change in templates and hidden files #8407

alexanderson1993 opened this issue Jan 2, 2024 · 10 comments · Fixed by #8385 or #8415
Labels
bug Something isn't working package:dev

Comments

@alexanderson1993
Copy link
Contributor

Reproduction

  • Run npx create-remix@latest with all default options
  • Delete entry.server.ts
  • Run npm remove isbot
  • Run npm install to make sure the dependency is removed from node_modules
  • Run npm run dev

It will print the following and add "isbot": "latest" to package.json:

adding `isbot` to your package.json, you should commit this change
  • The app should fail to build.

Note: As of this issue being filed, it appears a new version has been marked as latest, so the breaking v4 version is no longer installed. As such, the reproduction doesn't break anything. However, the breaking v4 version will be marked as latest soon.

If you want to break it now, run npm install isbot@next to install the new isbot@4.

https://www.npmjs.com/package/isbot#version-4-will-become-the-latest-version-on-npm-on-january-2024

System Info

System:
    OS: macOS 13.6.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 31.58 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.volta/tools/image/node/18.18.2/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 9.8.1 - ~/.volta/tools/image/node/18.18.2/bin/npm
    pnpm: 8.6.10 - ~/.volta/bin/pnpm
    bun: 1.0.11 - ~/.bun/bin/bun
    Watchman: 2023.11.20.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 120.0.6099.129
    Safari: 17.0
  npmPackages:
    @remix-run/css-bundle: ^2.4.1 => 2.4.1 
    @remix-run/dev: ^2.4.1 => 2.4.1 
    @remix-run/node: ^2.4.1 => 2.4.1 
    @remix-run/react: ^2.4.1 => 2.4.1 
    @remix-run/serve: ^2.4.1 => 2.4.1

Used Package Manager

npm

Expected Behavior

The dev server should build and start up without issue.

Actual Behavior

The app fails to build with an invalid import error.

@alexanderson1993
Copy link
Contributor Author

It seems isbot is the only dependency that's handled this way. It seems possible there will be breaking changes in the future, but the maintainer seems to be following semver, so it might be a good idea to use a major pinned version instead of "latest".

@brophdawg11 brophdawg11 linked a pull request Jan 2, 2024 that will close this issue
@brophdawg11 brophdawg11 self-assigned this Jan 2, 2024
@brophdawg11 brophdawg11 added bug Something isn't working package:dev and removed bug:unverified labels Jan 2, 2024
@brophdawg11 brophdawg11 linked a pull request Jan 2, 2024 that will close this issue
@brophdawg11
Copy link
Contributor

This is resolved by #8385 and will be available in the next release. To workaround the issue in the meantime, you can downgrade isbot to 3.x in your package.json

@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Jan 2, 2024
@brophdawg11
Copy link
Contributor

This is now being handled by #8415 - but will still be available in the next release

@brophdawg11 brophdawg11 reopened this Jan 2, 2024
@omrilotan
Copy link

omrilotan commented Jan 2, 2024

I have released isbot@3.8.0 (isbot@legacy) to help with the migration. This version includes isbot.isbot property and a named property.

With v3.8.0 users will be able to import the "isbot" property using the same syntax as a named import

import { isbot } from "isbot" // works on >=3.8.0, >=4.0.0

Hope this will make the migration easier

@jarimustonen
Copy link

For me, the added line is "isbot": "latest".

And running remix dev --manual gives the following:

[remix-serve] http://localhost:3000 (http://192.168.0.109:3000)

TypeError: (0 , import_isbot.default) is not a function
    at handleRequest (/Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/dev/dist/config/defaults/entry.server.node.tsx:18:10)
    at handleDocumentRequestRR (/Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/server-runtime/dist/server.js:224:18)
    at requestHandler (/Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/server-runtime/dist/server.js:105:18)
    at /Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/express/dist/server.js:41:22
TypeError: (0 , import_isbot.default) is not a function
    at handleRequest (/Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/dev/dist/config/defaults/entry.server.node.tsx:18:10)
    at handleDocumentRequestRR (/Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/server-runtime/dist/server.js:251:20)
    at requestHandler (/Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/server-runtime/dist/server.js:105:18)
    at /Users/jari/Sources/okv-homepage/homepage-fi/node_modules/@remix-run/express/dist/server.js:41:22
GET / 500 - - 15.194 ms

I fixed this by changing the version requirement to be specific: "isbot": "3.8.0"

@brophdawg11 brophdawg11 linked a pull request Jan 3, 2024 that will close this issue
@brophdawg11
Copy link
Contributor

Resolved via #8415

Copy link
Contributor

github-actions bot commented Jan 9, 2024

🤖 Hello there,

We just published version 2.5.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

1 similar comment
Copy link
Contributor

github-actions bot commented Jan 9, 2024

🤖 Hello there,

We just published version 2.5.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 2.5.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

1 similar comment
Copy link
Contributor

🤖 Hello there,

We just published version 2.5.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package:dev
Projects
None yet
4 participants