epicweb-dev / web-forms

Learn the primary mechanism for interactivity on the web.
https://www.epicweb.dev/workshops/professional-web-forms
Other
199 stars 61 forks source link

Cannot find module @mux/mux-video/dist/index.cjs.js #24

Closed trongbinh15 closed 12 months ago

trongbinh15 commented 12 months ago

After run npm run setup, I got this error when running npm run start

Encountered error importing the server, exiting... Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/nguytb15/web-forms/node_modules/@mux/mux-video/dist/index.mjs' imported from /Users/nguytb15/web-forms/node_modules/@mux/mux-player/dist/index.mjs Did you mean to import @mux/mux-video/dist/index.cjs.js? at new NodeError (node:internal/errors:405:5) at finalizeResolution (node:internal/modules/esm/resolve:324:11) at moduleResolve (node:internal/modules/esm/resolve:943:10) at defaultResolve (node:internal/modules/esm/resolve:1129:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:835:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap. (node:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND' } Encountered error running the server, exiting...

Please help me

trongbinh15 commented 12 months ago

NodeJs 18 solved this problem

kentcdodds commented 12 months ago

What version of node were you using when this broke?

trongbinh15 commented 12 months ago

It's 16. I thought the validation should warn that.

kentcdodds commented 12 months ago

Yeah, it definitely should have errored out for you when you ran npm run setup. Not sure why it didn't. If you notice issues in the future, let me know.