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

[Bug]: Cloudflare-workers installation does not work. #572

Closed
1 of 12 tasks
loonfly opened this issue Nov 24, 2021 · 2 comments
Closed
1 of 12 tasks

[Bug]: Cloudflare-workers installation does not work. #572

loonfly opened this issue Nov 24, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@loonfly
Copy link

loonfly commented Nov 24, 2021

Which Remix packages are impacted?

  • remix (Remix core)
  • create-remix
  • @remix-run/architect
  • @remix-run/cloudflare-workers
  • @remix-run/dev
  • @remix-run/express
  • @remix-run/netlify
  • @remix-run/node
  • @remix-run/react
  • @remix-run/serve
  • @remix-run/server-runtime
  • @remix-run/vercel

What version of Remix are you using?

1.0.4

Steps to Reproduce

Install Remix run with cloudflare workers with the following commands

npx create-remix@latest

And i chose the followings

? Where would you like to create your app? .
? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targets. Cloudflare Workers
? TypeScript or JavaScript? JavaScript
? Do you want me to run "npm install"? Yes

Once installed successfully (without any errors), I follow the README.md file to

# in one tab (starts remix dev server)`
$ npm run dev

# in another (starts miniflare server)
$ npm start

Expected Behavior

The dev server should start as usual.

Actual Behavior

Running $ npm run dev gives the following errors:

D:\projects\unpacky\node_modules\@remix-run\dev\compiler\plugins\mdx.js:47:25: error: [plugin: remix-mdx] Not supported
    47 │       }] = await Promise.all([import('xdm'), import('remark-frontmat...
       ╵                          ^
    at setup (D:\projects\unpacky\node_modules\@remix-run\dev\compiler\plugins\mdx.js:47:26)
    at handlePlugins (D:\projects\unpacky\node_modules\esbuild\lib\main.js:756:23)
    at Object.buildOrServe (D:\projects\unpacky\node_modules\esbuild\lib\main.js:1044:7)
    at D:\projects\unpacky\node_modules\esbuild\lib\main.js:1895:17
    at new Promise (<anonymous>)
    at Object.build (D:\projects\unpacky\node_modules\esbuild\lib\main.js:1894:14)
    at Object.build (D:\projects\unpacky\node_modules\esbuild\lib\main.js:1749:51)
    at createServerBuild (D:\projects\unpacky\node_modules\@remix-run\dev\compiler.js:322:29)
    at async Promise.all (index 1)
    at async buildEverything (D:\projects\unpacky\node_modules\@remix-run\dev\compiler.js:259:12)


Build failed with 1 error:
D:\projects\unpacky\node_modules\@remix-run\dev\compiler\plugins\mdx.js:47:25: error: [plugin: remix-mdx] Not supported

Running $ npm start gives the following errors:

> remix-app-template-js@ start D:\projects\unpacky
> miniflare --build-command "npm run dev:worker" --watch

D:\projects\unpacky\node_modules\miniflare\bootstrap.js:3
import childProcess from "child_process";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Module._compile (internal/modules/cjs/loader.js:895:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! remix-app-template-js@ start: `miniflare --build-command "npm run dev:worker" --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the remix-app-template-js@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\tmpnodejsnpm-cache\_logs\2021-11-24T08_55_36_969Z-debug.log
@loonfly loonfly added the bug Something isn't working label Nov 24, 2021
@loonfly loonfly changed the title [Bug]: [Bug]: Cloudflare-workers installation does not work. Nov 25, 2021
@chaance
Copy link
Collaborator

chaance commented Dec 18, 2021

Unable to reproduce as of 1.1.0, let us know if you're still having this issue.

@chaance chaance closed this as completed Dec 18, 2021
@loonfly
Copy link
Author

loonfly commented Jan 10, 2022

Hi, thanks for the feedback. Have switched to remix@cloudflare-pages. not sure if the issue still persists. let's close this issue for good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants