error in run make docker(babel-loader) #9270
Unanswered
shomid
asked this question in
Self hosted
Replies: 1 comment
-
Same here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when i run make docker command for building containers in mode production, get following error ::
433.3 ERROR in ./node_modules/lettersanitizer/lib/esm/index.js 65:20 433.3 Module parse failed: Unexpected token (65:20) 433.3 File was processed with these loaders: 433.3 * ./node_modules/babel-loader/lib/index.js 433.3 You may need an additional loader to handle the result of these loaders. 433.3 | let node; 433.3 | while (node = commentIter.nextNode()) { 433.3 > node.parentNode?.removeChild(node); 433.3 | } 433.3 | const removeTags = [...removeWithContents]; 433.3 @ ./node_modules/vue-letter/dist/Letter.esm.js 2:0-43 26:13-21 433.3 @ ./node_modules/babel-loader/lib??ref--7-0!./node_modules/vue-loader/lib??vue-loader-options!./app/javascript/dashboard/components/widgets/conversation/bubble/Text.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/bubble/Text.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/bubble/Text.vue 433.3 @ ./node_modules/babel-loader/lib??ref--7-0!./node_modules/vue-loader/lib??vue-loader-options!./app/javascript/dashboard/components/widgets/conversation/Message.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/Message.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/Message.vue 433.3 @ ./node_modules/babel-loader/lib??ref--7-0!./node_modules/vue-loader/lib??vue-loader-options!./app/javascript/dashboard/components/widgets/conversation/MessagesView.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/MessagesView.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/MessagesView.vue 433.3 @ ./node_modules/babel-loader/lib??ref--7-0!./node_modules/vue-loader/lib??vue-loader-options!./app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue 433.3 @ ./node_modules/babel-loader/lib??ref--7-0!./node_modules/vue-loader/lib??vue-loader-options!./app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue?vue&type=script&lang=js 433.3 @ ./app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue 433.3 @ ./app/javascript/dashboard/routes/dashboard/inbox/routes.js 433.3 @ ./app/javascript/dashboard/routes/dashboard/dashboard.routes.js 433.3 @ ./app/javascript/dashboard/routes/index.js 433.3 @ ./app/javascript/packs/application.js
An error occurs when executing the following line in Docker::
RUN if [ "$RAILS_ENV" = "production" ]; then \ bundle config set without 'development test'; bundle install -j 4 -r 3; \ else bundle install -j 4 -r 3; \ fi
package.json
{ "name": "@chatwoot/chatwoot", "version": "3.7.0", "license": "MIT", "scripts": { "eslint": "eslint app/**/*.{js,vue}", "eslint:fix": "eslint app/**/*.{js,vue} --fix", "pretest": "rimraf .jest-cache", "test": "jest -w 1 --no-cache --no-coverage", "test:watch": "jest -w 1 --watch --no-cache", "test:coverage": "jest -w 1 --no-cache --collectCoverage", "webpacker-start": "webpack-dev-server -d --config webpack.dev.config.js --content-base public/ --progress --colors", "start:dev": "foreman start -f ./Procfile.dev", "start:test": "RAILS_ENV=test foreman start -f ./Procfile.test", "start:dev-overmind": "overmind start -f ./Procfile.dev", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook", "ruby:prettier": "bundle exec rubocop -a", "prepare": "husky install", "size": "size-limit" }, "size-limit": [ { "path": "public/packs/js/widget-*.js", "limit": "281 KB" }, { "path": "public/packs/js/sdk.js", "limit": "40 KB" } ], "dependencies": { "@braid/vue-formulate": "^2.5.2", "@chatwoot/prosemirror-schema": "1.0.5", "@chatwoot/utils": "^0.0.23", "@hcaptcha/vue-hcaptcha": "^0.3.2", "@june-so/analytics-next": "^2.0.0", "@radix-ui/colors": "^1.0.1", "@rails/actioncable": "6.1.3", "@rails/ujs": "^7.0.3-1", "@rails/webpacker": "5.4.4", "@scmmishra/pico-search": "0.5.1", "@sentry/tracing": "^6.19.7", "@sentry/vue": "^6.19.7", "@sindresorhus/slugify": "1.1.0", "@tailwindcss/typography": "^0.5.9", "activestorage": "^5.2.6", "autoprefixer": "^10.4.14", "axios": "^1.6.0", "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-vue-jsx": "^3.7.0", "chart.js": "~2.9.4", "color2k": "^2.0.2", "company-email-validator": "^1.0.8", "core-js": "3.11.0", "date-fns": "2.21.1", "date-fns-tz": "^1.3.3", "dompurify": "2.2.7", "foundation-sites": "~6.5.3", "highlight.js": "~10.4.1", "idb": "^7.1.1", "ionicons": "~2.0.1", "js-cookie": "^3.0.5", "libphonenumber-js": "^1.10.24", "logrocket": "^3.0.1", "logrocket-vuex": "^0.0.3", "markdown-it": "^13.0.1", "markdown-it-link-attributes": "^4.0.1", "md5": "^2.3.0", "ninja-keys": "^1.2.2", "opus-recorder": "^8.0.5", "postcss": "^8.4.31", "postcss-loader": "^4.2.0", "semver": "7.5.3", "tailwindcss": "^3.3.2", "turbolinks": "^5.2.0", "url-loader": "^2.0.0", "urlpattern-polyfill": "^6.0.2", "v-tooltip": "~2.1.3", "videojs-record": "^4.5.0", "vue": "^2.7.0", "vue-chartjs": "3.5.1", "vue-clickaway": "~2.1.0", "vue-color": "2.8.1", "vue-dompurify-html": "^2.5.2", "vue-easytable": "2.5.5", "vue-i18n": "8.24.3", "vue-letter": "^0.1.3", "vue-loader": "^15.10.0", "vue-multiselect": "~2.1.6", "vue-router": "~3.5.2", "vue-template-compiler": "^2.7.0", "vue-upload-component": "2.8.22", "vue-virtual-scroll-list": "^2.3.5", "vue2-datepicker": "^3.9.1", "vuedraggable": "^2.24.3", "vuelidate": "0.7.7", "vuex": "~2.1.1", "vuex-router-sync": "~4.1.2", "wavesurfer.js": "^6.0.4", "webpack": "^4.46.0", "webpack-cli": "^3.3.12", "@alireza-ab/vue-persian-datepicker": "2.3.2", "qrcode.vue": "~1.7.0", "date-fns-jalali": "2.30.0-0" }, "devDependencies": { "@babel/core": "7.13.16", "@babel/eslint-parser": "^7.22.15", "@babel/plugin-proposal-class-properties": "7.13.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/preset-env": "7.13.15", "@size-limit/file": "^8.2.4", "@storybook/addon-actions": "6.5.9", "@storybook/addon-docs": "^6.5.9", "@storybook/addon-essentials": "6.5.9", "@storybook/addon-links": "6.5.9", "@storybook/addon-postcss": "^2.0.0", "@storybook/addons": "6.5.9", "@storybook/vue": "6.5.9", "@types/jest": "^29.5.2", "@vue/test-utils": "^1.3.6", "@vue/vue2-jest": "29", "babel-core": "^7.0.0-bridge.0", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-jest": "29", "babel-loader": "8.2.2", "babel-preset-vue": "^2.0.2", "cypress": "^13.4.0", "eslint": "^8.49.0", "eslint-config-airbnb-base": "15.0.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-webpack": "^0.13.7", "eslint-plugin-babel": "5.3.1", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-html": "7.1.0", "eslint-plugin-import": "2.28.1", "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-prettier": "5.0.0", "eslint-plugin-storybook": "^0.6.14", "eslint-plugin-vue": "^9.17.0", "expect-more-jest": "^2.4.2", "fake-indexeddb": "^4.0.1", "husky": "^7.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "jest-serializer-vue": "^2.0.2", "jest-transform-stub": "^2.0.0", "lint-staged": "14.0.1", "postcss-preset-env": "^8.5.1", "prettier": "^3.0.3", "rimraf": "^3.0.0", "size-limit": "^8.2.4", "webpack-dev-server": "^3" }, "engines": { "node": "20.x", "npm": ">=6.x", "yarn": "1.22.x" }, "husky": { "hooks": { "pre-push": "sh bin/validate_push" } }, "lint-staged": { "app/**/*.{js,vue}": [ "eslint --fix", "git add" ], "*.scss": [ "scss-lint" ] } }
babel.config.js
`const plugins = () => [
require('babel-plugin-macros'),
require('@babel/plugin-proposal-nullish-coalescing-operator'),
[
require('@babel/plugin-proposal-class-properties').default,
{
loose: true,
},
],
[require('babel-plugin-transform-vue-jsx')],
];
module.exports = api => {
const validEnv = ['development', 'test', 'production'];
const currentEnv = api.env();
if (!validEnv.includes(currentEnv)) {
throw new Error(
${ 'Please specify a valid
NODE_ENVor ' + '
BABEL_ENVenvironment variables. Valid values are "development", ' + '"test", and "production". Instead, received: ' }${JSON.stringify(currentEnv)}.
);
}
return {
presets: [
[
require('@babel/preset-env').default,
{
useBuiltIns: 'usage',
corejs: 3,
targets: '> 0.25%, not dead',
},
],
],
plugins: plugins(),
};
};
`
Beta Was this translation helpful? Give feedback.
All reactions