remix: Unexpected Server Error with JavaScript

What version of Remix are you using?

1.7.4

Steps to Reproduce

I created a Remix app using the npx create-remix@latest command and then choosing Just the basics and then Remix App Server and then JavaScript, But when I then run the server it gives me the following error:

Unexpected Server Error

TypeError: isbot is not a function

If instead of Javascript I choose Typescript, the app works fine.

Expected Behavior

The app should load and run.

Actual Behavior

Gives an Unexpected Server Error error.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 17 (2 by maintainers)

Most upvoted comments

@machour Thanks for the reply. After changing const isbot = require("isbot").default; to const isbot = require("isbot");, the app has started and is working fine, and the value of isbot becomes isbot [Function: isbot].

I also face this issue today.

Remix Version: 1.7.5 Node Version: v18.12.0

Changing const isbot = require("isbot").default to const isbot = require("isbot") fixed the issue.

I also face this issue today.

Remix Version: 1.7.5 Node Version: v18.12.0

Changing const isbot = require("isbot").default to const isbot = require("isbot") fixed the issue.

Can confirm similar behaviour.

Remix v. 1.7.5

Node version 16.13.1

Selected “Just the basics”, “Remix Server”, “Javascript”. As soon as I changed the isbot require, the server automatically re-rendered index.jsx and it was displayed properly in the browser.