remix: create-remix Error: Cannot find module '**\package.json'

What version of Remix are you using?

v1.3.1 / latest

node version (use nvm): v16.13.2

Steps to Reproduce

  1. npx create-remix@latest remix-test
  • Just the basics
  • Remix App Server
  • TypeScript
  • No
  1. and then error occured
E:\react>npx create-remix@latest remix-test
💿 Welcome to Remix! Let's get you set up with a new project.

? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targets. Remix App Server
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? No
Error: Cannot find module 'E:\react\remix-test\package.json'
Require stack:
- C:\Users\hasee\AppData\Local\npm-cache\_npx\d12062682bcda260\node_modules\@remix-run\dev\create.js
- C:\Users\hasee\AppData\Local\npm-cache\_npx\d12062682bcda260\node_modules\@remix-run\dev\cli\commands.js
- C:\Users\hasee\AppData\Local\npm-cache\_npx\d12062682bcda260\node_modules\@remix-run\dev\cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.createApp (C:\Users\hasee\AppData\Local\npm-cache\_npx\d12062682bcda260\node_modules\@remix-run\dev\create.js:156:16)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.create (C:\Users\hasee\AppData\Local\npm-cache\_npx\d12062682bcda260\node_modules\@remix-run\dev\cli\commands.js:68:3)
    at async run (C:\Users\hasee\AppData\Local\npm-cache\_npx\d12062682bcda260\node_modules\@remix-run\dev\cli.js:324:9) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\hasee\\AppData\\Local\\npm-cache\\_npx\\d12062682bcda260\\node_modules\\@remix-run\\dev\\create.js',
    'C:\\Users\\hasee\\AppData\\Local\\npm-cache\\_npx\\d12062682bcda260\\node_modules\\@remix-run\\dev\\cli\\commands.js',
    'C:\\Users\\hasee\\AppData\\Local\\npm-cache\\_npx\\d12062682bcda260\\node_modules\\@remix-run\\dev\\cli.js'
  ]
}
Error: Command failed: npx --yes @remix-run/dev@1.3.1 create remix-test
    at checkExecSyncError (node:child_process:826:11)
    at Object.execSync (node:child_process:900:15)
    at run (C:\Users\hasee\AppData\Local\npm-cache\_npx\5164864a48bff686\node_modules\create-remix\cli.js:30:17)
    at Object.<anonymous> (C:\Users\hasee\AppData\Local\npm-cache\_npx\5164864a48bff686\node_modules\create-remix\cli.js:35:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 8504,
  stdout: null,
  stderr: null
}

Expected Behavior

successfully created project

Actual Behavior

error

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (2 by maintainers)

Most upvoted comments

Confirmed on WSL + PowerShell, woohoo! Patch coming shortly, thanks again everyone!

Boom!! [v0.0.0-experimental-fde68a7](https://github.com/remix-run/remix/releases/tag/v0.0.0-experimental-fde68a7) works correctly. Thanks @chaance !

Stable patch should go out tomorrow morning. If anyone feels like running a few more stress tests for me, npx create-remix@1.3.2-pre.0 is ready to roll.

Anyone know fix it, I’m getting it

npx create-remix@1.2.3 remix-test

Stable patch should go out tomorrow morning. If anyone feels like running a few more stress tests for me, npx create-remix@1.3.2-pre.0 is ready to roll.

Success on Windows 11 (git bash) and MacOS Monterey 12.3 (iTerm2).

? Where would you like to create your app? app2
? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targets. Remix App Server
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? No
💿 That's it! `cd` into "/Users/vic/app2" and check the README for development and deploy instructions!

On my Mac (Monterey 12.3) all seems good (using latest). Some alignment issues with the Welcome though…

Screen Shot 2022-03-17 at 2 13 11 PM

Can someone on Windows try again with npx create-remix@0.0.0-experimental-f2df4787?

Still the same

D:\Data\code\study>npx create-remix@0.0.0-experimental-f2df4787 remix-test
Need to install the following packages:
  create-remix@0.0.0-experimental-f2df4787
Ok to proceed? (y) y
💿 Welcome to Remix! Let's get you set up with a new project.

npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targets. Remix App Server
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? No
Error: Cannot find module 'D:\Data\code\study\remix-test\package.json'
Require stack:
- D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\d6c2377d37c9d8c5\node_modules\@remix-run\dev\create.js
- D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\d6c2377d37c9d8c5\node_modules\@remix-run\dev\cli\commands.js
- D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\d6c2377d37c9d8c5\node_modules\@remix-run\dev\cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.createApp (D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\d6c2377d37c9d8c5\node_modules\@remix-run\dev\create.js:156:16)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.create (D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\d6c2377d37c9d8c5\node_modules\@remix-run\dev\cli\commands.js:68:3)
    at async run (D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\d6c2377d37c9d8c5\node_modules\@remix-run\dev\cli.js:324:9) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\Development\\NVM\\nvm\\v16.13.2\\node_cache\\_npx\\d6c2377d37c9d8c5\\node_modules\\@remix-run\\dev\\create.js',
    'D:\\Development\\NVM\\nvm\\v16.13.2\\node_cache\\_npx\\d6c2377d37c9d8c5\\node_modules\\@remix-run\\dev\\cli\\commands.js',
    'D:\\Development\\NVM\\nvm\\v16.13.2\\node_cache\\_npx\\d6c2377d37c9d8c5\\node_modules\\@remix-run\\dev\\cli.js'
  ]
}
Error: Command failed: npx --yes @remix-run/dev@0.0.0-experimental-f2df4787 create remix-test
    at checkExecSyncError (node:child_process:826:11)
    at Object.execSync (node:child_process:900:15)
    at run (D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\3432d5c20277e22d\node_modules\create-remix\cli.js:30:17)
    at Object.<anonymous> (D:\Development\NVM\nvm\v16.13.2\node_cache\_npx\3432d5c20277e22d\node_modules\create-remix\cli.js:35:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 3812,
  stdout: null,
  stderr: null
}