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

create-remix with indie stack template breaks when choosing JavaScript because prisma/seed.ts is now prisma/seed.js #2998

Closed
Kilian opened this issue Apr 27, 2022 · 1 comment
Labels
bug:unverified duplicate This issue or pull request already exists

Comments

@Kilian
Copy link
Contributor

Kilian commented Apr 27, 2022

What version of Remix are you using?

1.4.1

Steps to Reproduce

Follow the blog tutorial: https://remix.run/docs/en/v1/tutorials/blog and choose for JavaScript instead of TypeScript (using Node 14, though I don't know if that's relevant here)

The issue seems to be mentioned here as well: #2714 (comment)

Expected Behavior

The setup succeeds and I can learn how to use Remix.

Actual Behavior

The setup breaks because it tries to find a file called prisma/seed.ts, but there is only a prisma/seed.js file:

Running seed command `ts-node --require tsconfig-paths/register prisma/seed.ts` ...
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module './seed.ts'
Require stack:
- /home/kilian/Workspace/personal/remix/blog-tutorial2/prisma/imaginaryUncacheableRequireResolveScript
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.resolve (internal/modules/cjs/helpers.js:94:19)
    at requireResolveNonCached (/home/kilian/Workspace/personal/remix/blog-tutorial2/node_modules/ts-node/dist/bin.js:489:16)
    at getProjectSearchDir (/home/kilian/Workspace/personal/remix/blog-tutorial2/node_modules/ts-node/dist/bin.js:459:40)
    at phase3 (/home/kilian/Workspace/personal/remix/blog-tutorial2/node_modules/ts-node/dist/bin.js:263:27)
    at bootstrap (/home/kilian/Workspace/personal/remix/blog-tutorial2/node_modules/ts-node/dist/bin.js:44:30)
    at main (/home/kilian/Workspace/personal/remix/blog-tutorial2/node_modules/ts-node/dist/bin.js:32:12)
    at Object.<anonymous> (/home/kilian/Workspace/personal/remix/blog-tutorial2/node_modules/ts-node/dist/bin.js:519:5)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/kilian/Workspace/personal/remix/blog-tutorial2/prisma/imaginaryUncacheableRequireResolveScript'
  ]
}

An error occured while running the seed command:
Error: Command failed with exit code 1: ts-node --require tsconfig-paths/register prisma/seed.ts

When choosing the TypeScript variant, things work as ecpected.

@MichaelDeBoey
Copy link
Member

MichaelDeBoey commented Apr 27, 2022

Duplicate of #2781

I've created remix-run/indie-stack#63, remix-run/blues-stack#57 & remix-run/grunge-stack#50 in order to fix this.

@MichaelDeBoey MichaelDeBoey marked this as a duplicate of #2781 Apr 27, 2022
@MichaelDeBoey MichaelDeBoey added the duplicate This issue or pull request already exists label Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants