Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

npm run dev errors out in windows machines with "Cannot find module '--require/package.json'" #228

@senthil-sprint1

Description

@senthil-sprint1

What version of Remix are you using?

1.14.1

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

  • Yes

Steps to Reproduce

I was trying to follow the "Blog Tutorial(short)" from here.

  • Run the create-remix command npx create-remix@latest --template remix-run/indie-stack blog-tutorial
  • Select Typescript
  • Answer Y for ? Do you want me to run npm install? Yes
  • Open the created folder in VSCode with "I trust the author" settings.
  • Run npm run dev

Expected Behavior

I expect it to start the server and I should be able to navigate to http://localhost:3000/ and see the following image.
image

Actual Behavior

Command exits with the following output,

C:\SKR\throwaway\blog-tutorial-skr\node_modules\resolve\lib\sync.js:113
    throw err;
    ^

Error: Cannot find module '--require/package.json' from 'C:\SKR\throwaway\blog-tutorial-skr'
    at Function.resolveSync [as sync] (C:\SKR\throwaway\blog-tutorial-skr\node_modules\resolve\lib\sync.js:111:15)
    at Object.<anonymous> (C:\SKR\throwaway\blog-tutorial-skr\node_modules\binode\bin.js:21:28)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND'
}

Node.js v19.7.0
ERROR: "dev:remix" exited with 1.

OS Version

# systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
OS Name:                   Microsoft Windows 11 Home
OS Version:                10.0.22000 N/A Build 22000

create-remix version

# npx create-remix --version                             
1.14.1

Node & npm Version

# node --version
v19.7.0
# npm --version
8.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:unverifiedneeds responseWe need a response from the original author about the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions