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

Deployment bundle doesn't work #1

Open
EdoElgx opened this issue Nov 22, 2023 · 0 comments
Open

Deployment bundle doesn't work #1

EdoElgx opened this issue Nov 22, 2023 · 0 comments

Comments

@EdoElgx
Copy link

EdoElgx commented Nov 22, 2023

Hello,

I have serious problems deploying apps build with meteor/vite/solidjs. Testing this code, I see it has the same problem.

First, I cloned this repo:

❯ cd temp
❯ git clone https://github.com/fredmaiaarantes/meteor-solid-app.git
❯ cd meteor-solid-app
❯ meteor run

Error...

Fix:

❯ meteor npm install --save @babel/runtime
...
❯ meteor run

Ok

Deploy (locally):

❯ meteor build ../test
❯ cd ../test
❯ tar -xzvf meteor-solid-app.tar.gz
❯ cd bundle/programs/server
❯ npm install

Packages install Ok.

Run:

❯ cd ../../
❯ export ROOT_URL=http://localhost:3000
❯ export MONGO_URL=mongodb://localhost:27017
❯ export PORT=3000
❯ node main.js
internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /Users/.../temp/test/bundle/programs/server/assets/packages/vite_bundler/worker-dev.mjs
    at new NodeError (internal/errors.js:322:7)
    at packageResolve (internal/modules/esm/resolve.js:732:9)
    at moduleResolve (internal/modules/esm/resolve.js:773:18)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
    at Loader.resolve (internal/modules/esm/loader.js:89:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
    at link (internal/modules/esm/module_job.js:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
Server is started!

When navigating to http://localhost:3000 I see a blank page reloading in an infinite loop.

If I remove Vite, when I deploy I get an error about a missing import React. I've been able to make it work by removing ecmascript and installing this package: https://github.com/edemaine/meteor-solid. But working without Vite is painfully slow.

Any help is very welcomed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant