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

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

Open
1 task done
senthil-sprint1 opened this issue Mar 12, 2023 · 1 comment
Labels
bug:unverified needs response We need a response from the original author about the issue

Comments

@senthil-sprint1
Copy link

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
@machour machour transferred this issue from remix-run/remix Apr 26, 2023
@machour
Copy link
Collaborator

machour commented May 17, 2024

Hey @senthil-sprint1 👋🏼
Are you still able to reproduce this issue?

@machour machour added the needs response We need a response from the original author about the issue label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified needs response We need a response from the original author about the issue
Projects
None yet
Development

No branches or pull requests

2 participants