JorgenVatle / meteor-vite

⚑ Replace Meteor's bundler with Vite for blazing fast build-times
MIT License
29 stars 10 forks source link

module.dynamicImport is not recognized #176

Closed getninjaN closed 3 months ago

getninjaN commented 3 months ago

Hi. I'm trying to slowly upgrade my app to Meteor 3 and after managing to get the thing running-ish, I'm getting this in my terminal:

(STDERR) ⚑  Meteor module.dynamicImport(...) is not recognized by Meteor-Vite! Please open an issue to get this resolved! πŸ™

I have no idea from where, or why. This is the only information I'm getting. πŸ˜…

packages

meteor-base             # Packages every Meteor app needs to have
mongo                   # The database Meteor supports right now
reactive-var            # Reactive variable for tracker

standard-minifier-js    # JS minifier run for production mode
standard-minifier-css
typescript              # Enable TypeScript syntax in .ts and .tsx modules
shell-server            # Server-side component of the `meteor shell` command

tracker                 # Dependency tracker to allow reactive callbacks
static-html             # Define static page content in .html files

akryum:vue-sass
accounts-password
aldeed:collection2
pauldowman:dotenv
alanning:roles@4.0.0-rc.1
dburles:collection-helpers
matb33:collection-hooks
aldeed:schema-index
aldeed:schema-deny
accounts-ui
mizzao:user-status@2.0.0-beta.0
mdg:validated-method
ecmascript

montiapm:agent
quave:picker
spacebars-compiler
leonardoventurini:scss
jorgenvatle:vite-bundler@3.0.0-meteor3.next.10
aldeed:simple-schema
accounts-base
blaze

versions

accounts-base@3.0.0
accounts-password@3.0.0
accounts-ui@1.4.3
accounts-ui-unstyled@1.7.2
akryum:vue-sass@0.1.3
alanning:roles@4.0.0-rc.1
aldeed:collection2@4.0.3
aldeed:schema-deny@4.0.1
aldeed:schema-index@4.0.0-beta.4
aldeed:simple-schema@1.13.1
allow-deny@2.0.0
autoupdate@2.0.0
babel-compiler@7.11.0
babel-runtime@1.5.2
base64@1.0.13
binary-heap@1.0.12
blaze@3.0.0
blaze-tools@2.0.0
boilerplate-generator@2.0.0
caching-compiler@2.0.0
caching-html-compiler@2.0.0
callback-hook@1.6.0
check@1.4.2
core-runtime@1.0.0
dburles:collection-helpers@1.0.0
ddp@1.4.2
ddp-client@3.0.0
ddp-common@1.4.3
ddp-rate-limiter@1.2.2
ddp-server@3.0.0
diff-sequence@1.1.3
dynamic-import@0.7.4
ecmascript@0.16.9
ecmascript-runtime@0.8.2
ecmascript-runtime-client@0.12.2
ecmascript-runtime-server@0.11.1
ejson@1.1.4
email@3.0.0
es5-shim@4.8.1
facts-base@1.0.2
fetch@0.1.5
geojson-utils@1.0.12
hot-code-push@1.0.5
html-tools@2.0.0
htmljs@2.0.1
http@1.4.4
id-map@1.2.0
inter-process-messaging@0.1.2
jorgenvatle:vite-bundler@3.0.0-meteor3.next.10
leonardoventurini:scss@2.0.0
less@4.1.1
localstorage@1.2.1
logging@1.3.5
matb33:collection-hooks@1.3.2
mdg:validated-method@1.3.0
meteor@2.0.0
meteor-base@1.5.2
minifier-css@2.0.0
minifier-js@3.0.0
minimongo@2.0.0
mizzao:timesync@0.5.5
mizzao:user-status@2.0.0-beta.0
modern-browsers@0.1.11
modules@0.20.1
modules-runtime@0.13.2
mongo@2.0.0
mongo-decimal@0.1.4-beta300.7
mongo-dev-server@1.1.1
mongo-id@1.0.9
mongo-livedata@1.0.13
montiapm:agent@3.0.0-beta.4
montiapm:meteorx@2.3.1
npm-mongo@4.17.3
observe-sequence@2.0.0
ordered-dict@1.2.0
pauldowman:dotenv@1.0.1
promise@1.0.0
quave:picker@1.2.0
raix:eventemitter@1.0.0
random@1.2.2
rate-limit@1.1.2
react-fast-refresh@0.2.9
reactive-dict@1.3.2
reactive-var@1.0.13
reload@1.3.2
retry@1.1.1
routepolicy@1.1.2
service-configuration@1.3.5
session@1.2.2
sha@1.0.10
shell-server@0.6.0
socket-stream-client@0.5.3
spacebars@2.0.0
spacebars-compiler@2.0.0
standard-minifier-css@1.9.3
standard-minifier-js@3.0.0
static-html@1.3.3
templating@1.4.4
templating-compiler@2.0.0
templating-runtime@2.0.0
templating-tools@2.0.0
tracker@1.3.4
typescript@5.4.3
underscore@1.6.4
url@1.3.3
webapp@2.0.0
webapp-hashing@1.1.2
zodern:meteor-package-versions@0.2.2
zodern:types@1.0.13
JorgenVatle commented 3 months ago

Hey there.

Looks like jorgenvatle:vite-bundler is on the 3.0.0 pre-release. Could you make sure the meteor-vite npm package is updated to the latest next release as well?

npm i meteor-vite@next

The jorgenvatle:vite-bundler@3.0.0 pre-releases are experimental. If you're running into issues, you can safely downgrade to jorgenvatle:vite-bundler@2.0.1 which is current stable release for Meteor v3. Run npm i meteor-vite@latest to also upgrade the npm package to the latest stable release.

getninjaN commented 3 months ago

Hey there.

Looks like jorgenvatle:vite-bundler is on the 3.0.0 pre-release. Could you make sure the meteor-vite npm package is updated to the latest next release as well?


npm i meteor-vite@next

The jorgenvatle:vite-bundler@3.0.0 pre-releases are experimental. If you're running into issues, you can safely downgrade to jorgenvatle:vite-bundler@2.0.1 which is current stable release for Meteor v3. Run npm i meteor-vite@latest to also upgrade the npm package to the latest stable release.

Aha, I see! I'll test asap and get back to you.

getninjaN commented 3 months ago

Yep, that did the trick. Thanks, been updating like crazy to make the app work with Meteor 3 so I guess this just went along for the ride. :)

getninjaN commented 2 months ago

I got this again for some reason but managed to solve it.

So if someone else is wondering it was because of this code in my /imports/api/routes/main.js file.

if (Meteor.isClient) {
  Template.registerHelper("raw", (string) => string)
  Template.registerHelper("doctype", () => "<!DOCTYPE html>")
  Template.registerHelper("eq", (value, value2) => value === value2)
  Template.registerHelper("neq", (value, value2) => value !== value2)
}

When I moved it to my SSR.js file instead and using Blaze.Template.registerHelper() instead of Template.registerHelper() it went away. πŸŽ‰