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

Remix with Javascript is entirely broken #2963

Closed
th317erd opened this issue Apr 22, 2022 · 2 comments
Closed

Remix with Javascript is entirely broken #2963

th317erd opened this issue Apr 22, 2022 · 2 comments
Labels
bug:unverified duplicate This issue or pull request already exists

Comments

@th317erd
Copy link

What version of Remix are you using?

1.4.1

Steps to Reproduce

Simply create a blank Remix app, using any template, and select "Javascript" instead of "Type Script" when you create the app.

Expected Behavior

The blank app should work after it is created.

Actual Behavior

The blank app most certainly doesn't work after it is created.

Node (17.9.0) still can natively use import or export statements, which is the only thing the code is using, which entirely breaks the whole app.

$ npm run dev
npm WARN config init.author.email Use `--init-author-email` instead.
npm WARN config init.author.url Use `--init-author-url` instead.

> dev
> run-p dev:*

npm WARN config init.author.email Use `--init-author-email` instead.
npm WARN config init.author.url Use `--init-author-url` instead.
npm WARN config init.author.email Use `--init-author-email` instead.
npm WARN config init.author.url Use `--init-author-url` instead.
npm WARN config init.author.email Use `--init-author-email` instead.
npm WARN config init.author.url Use `--init-author-url` instead.
npm WARN config init.author.email Use `--init-author-email` instead.
npm WARN config init.author.url Use `--init-author-url` instead.

> dev:server
> cross-env NODE_ENV=development node --inspect --require ./node_modules/dotenv/config --require ./mocks ./build/server.js


> dev:css
> cross-env NODE_ENV=development npm run generate:css -- --watch


> dev:remix
> cross-env NODE_ENV=development remix watch


> dev:build
> cross-env NODE_ENV=development npm run build:server -- --watch

Debugger listening on ws://127.0.0.1:9229/54c1ed31-70a2-4e6e-a2b8-a00f5823f09e
For help, see: https://nodejs.org/en/docs/inspector
Couldn't find tsconfig.json. tsconfig-paths will be skippeded in 1ms
/home/wyatt/Projects/love.me/mocks/start.js:1latten Completed in 1ms
import { setupServer } from "msw/node";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1027:15)
    at Module._compile (node:internal/modules/cjs/loader:1063:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/wyatt/Projects/love.me/mocks/index.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
ERROR: "dev:server" exited with 1.
@mariusk
Copy link

mariusk commented Apr 27, 2022

Confirmed, tested with node 14.

@MichaelDeBoey
Copy link
Member

Duplicate of #2781 & #2998

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 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

3 participants