Meteor 3.0-rc2 build has errors

Hello everyone,
I was just testing our newly migrated meteor 3.0-rc2 app will build correctly, but I can’t get it to work…

Here was my migration path, the app works very well locally. The build process we had use to work well too, but now it doesn’t anymore.
In this project the other big change is the addition of tailwind css.

Here is how I build :

meteor npm install --unsafe-perm --production
meteor --unsafe-perm build /var/www/ --directory

Here is the output :

Errors prevented bundling:                    
While minifying app code:                     
/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/parse-error.ts:74:19: Unexpected token, expected ":"
(344:557282)
at constructor (/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/parse-error.ts:74:19)
at FlowParserMixin.raise (/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/tokenizer/index.ts:1490:19)
at FlowParserMixin.unexpected
(/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/tokenizer/index.ts:1530:16)
at FlowParserMixin.expect (/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/parser/util.ts:150:28)
at FlowParserMixin.parseConditional
(/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/plugins/flow/index.ts:2107:12)
at FlowParserMixin.parseMaybeConditional
(/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/parser/expression.ts:363:17)
at FlowParserMixin.parseMaybeAssign

[and hundreds of similar lines]


(/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/plugins/flow/index.ts:3323:30)
at FlowParserMixin.parse (/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/parser/index.ts:45:10)
at Object.parse (/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/src/index.ts:66:38)
at Object.parse (/root/.meteor/packages/standard-minifier-js/.3.0.0-rc300.2.z8alil.dqh5++os+web.browser+web.browser.legacy+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/@meteorjs/babel/parser.js:7:22)
at Object.parse (packages/babel-compiler.js:39:29)
at extractModuleSizesTree (packages/minifyStdJS/plugin/stats.js:25:23)
at MeteorMinifier.processFilesForBundle (packages/minifyStdJS/plugin/minify-js.js:83:21)
at async Promise.all (index 0)
at /tools/isobuild/bundler.js:1427:9
at Object.enterJob (/tools/utils/buildmessage.js:387:12)
at ClientTarget.minifyJs (/tools/isobuild/bundler.js:1425:5)
at /tools/isobuild/bundler.js:905:11
at Object.enterJob (/tools/utils/buildmessage.js:387:12)
at ClientTarget.make (/tools/isobuild/bundler.js:849:5)
at /tools/isobuild/bundler.js:3289:9
at /tools/isobuild/bundler.js:3451:25
at Object.capture (/tools/utils/buildmessage.js:282:5)
at bundle (/tools/isobuild/bundler.js:3269:18)
at buildCommand (/tools/cli/commands.js:1408:22)
at /tools/cli/commands.js:1237:18
at Command.func (/tools/cli/commands.js:1235:10)
at /tools/cli/main.js:1528:15

Content of my package.json

{
    "dependencies": {
        "@babel/runtime": "^7.15.4",
        "@blaumaus/react-alert": "^7.0.7",
        "@bluelibs/nova": "^1.6.0",
        "@emotion/react": "^11.11.4",
        "@emotion/styled": "^11.11.0",
        "@floating-ui/react": "0.24.3",
        "@headlessui/react": "1.7.8",
        "@mui/icons-material": "^5.15.19",
        "@mui/material": "^5.13.0",
        "@pathofdev/react-tag-input": "1.0.7",
        "@tanstack/match-sorter-utils": "8.8.4",
        "@tanstack/react-query": "^5.36.0",
        "@tanstack/react-table": "8.7.9",
        "@tippyjs/react": "4.2.6",
        "axios": "^1.7.2",
        "bcrypt": "^5.0.1",
        "cleave.js": "1.6.0",
        "css-select": "5.1.0",
        "date-fns": "^3.6.0",
        "file-saver": "^2.0.5",
        "formik": "^2.4.5",
        "handlebars": "^4.7.7",
        "is-url": "1.2.4",
        "jotai": "^1.6.0",
        "lodash.get": "4.4.2",
        "meteor-accounts-t9n": "^2.6.0",
        "meteor-node-stubs": "^1.1.0",
        "moment": "^2.30.1",
        "mongodb": "^4.17.2",
        "murmurhash": "^2.0.1",
        "query-string": "^7.1.1",
        "react": "^18.2.0",
        "react-datepicker": "4.11.0",
        "react-dom": "^18.2.0",
        "react-feather": "2.0.10",
        "react-google-places-autocomplete": "4.0.1",
        "react-helmet": "^6.1.0",
        "react-phone-input-2": "2.15.1",
        "react-query": "^3.39.3",
        "react-router-dom": "^6.23.0",
        "react-select": "^5.7.0",
        "react-tippy": "1.4.0",
        "slate-history": "0.93.0",
        "slate-react": "0.94.0",
        "slate-serializers": "0.4.0",
        "sweetalert2": "^11.4.4",
        "tippy.js": "^6.3.7",
        "yup": "^0.32.11"
    },
    "meteor": {
        "mainModule": {
            "client": "client/main.jsx",
            "server": "server/main.js"
        },
        "testModule": "tests/main.js"
    },
   "devDependencies": {
        // removed eslint, types, husky, micromatch, prettier 
        "autoprefixer": "^10.4.19",
        "postcss": "^8.4.38",
        "tailwindcss": "^3.4.4"
    }
}

postcss, autoprefixer and tailwind are in devDependencies (which is what is proposed for the setup of tailwind) and we have the standard-minifier-css@1.9.3-rc300.2 installed…

postcss.config.js

module.exports = {
    plugins: {
        tailwindcss: {},
        autoprefixer: {},
    },
};

Any hint on what could be my problem ?
Thanks

For clarification, you mean it worked fine in rc1 and now on rc2 it doesn’t? Or it stopped working after you added the new dependencies? We will be investigating this shortly

Thanks ! It worked on 2.15 and now it doesn’t with 3.0-rc2.
A freshly created rc2 app build works as expected with the same build process.

I will iterate from this point to identify the point of failure. I will add my findings here

I nailed the issue with a lot of trials and error…

One of our package used npm package slate-serializers and our app was using "slate-serializers": "0.4.0",.
We refactored to "@slate-serializers/html": "^2.1.6", but still the same issue. The fact of importing html to slate broke the build

import { htmlToSlate } from '@slate-serializers/html'

We will move forward removing it, but this is weird…

Here is the repo for slate-serializers : slate-serializers/packages/html at main · thompsonsj/slate-serializers · GitHub

2 Likes