Jest runs no tests with React application - node.js

I have the following simple test in a t.test.js file in my React repo
test('sum', () => {
expect(1+1).toBe(3);
});
I followed the steps to set up Jest using the official guide.
However, when I run npm test, nothing happens. This is the output I get before Jest exits:
> # test
> jest
Using Jest CLI v0.8.2, jasmine1
What could be the problem? No tests are being run in my repository. Here is a dump of my package.json if necessary:
{
"private": true,
"engines": {
"node": ">=5.0 <6",
"npm": ">=3.3 <4"
},
"dependencies": {
"#google/maps": "^0.4.5",
"auth0-lock": "^10.24.3",
"autosuggest-highlight": "^3.1.1",
"aws-sdk": "^2.202.0",
"babel-polyfill": "6.9.1",
"babel-runtime": "6.9.2",
"bluebird": "3.1.1",
"body-parser": "^1.18.2",
"classnames": "2.2.1",
"cookie-parser": "^1.4.3",
"cors": "^2.8.3",
"cron": "^1.3.0",
"dotenv": "^2.0.0",
"downloadjs": "^1.4.7",
"eventemitter3": "1.1.1",
"express": "4.13.3",
"express-formidable": "^1.0.0",
"express-jwt": "^5.1.0",
"fastclick": "1.0.6",
"fbjs": "0.5.1",
"fetch-jsonp": "^1.1.3",
"flux": "2.1.1",
"formsy-react": "^0.19.5",
"front-matter": "2.0.1",
"fuse.js": "^2.5.0",
"google-libphonenumber": "^3.0.12",
"google-map-react": "^0.27.0",
"google-maps-react": "^1.1.2",
"history": "1.16.0",
"intercom-client": "^2.9.2",
"isomorphic-style-loader": "^4.0.0",
"jade": "1.11.0",
"json-loader": "^0.5.7",
"mailchimp-api-v3": "^1.8.0",
"markdown": "^0.5.0",
"mixpanel": "^0.8.0",
"mixpanel-browser": "^2.17.1",
"moment": "^2.20.1",
"moment-timezone": "^0.5.14",
"mongodb": "2.1.7",
"morgan": "^1.9.0",
"node-fetch": "1.3.3",
"normalize.css": "3.0.3",
"passport-auth0": "^0.6.1",
"passport-http": "^0.3.0",
"rc-progress": "^2.2.5",
"react": "^0.14.9",
"react-addons-create-fragment": "^0.14.8",
"react-autosuggest": "^9.3.4",
"react-day-picker": "^2.4.0",
"react-dom": "^0.14.9",
"react-redux": "^4.4.1",
"react-routing": "0.0.6",
"react-scrollable-anchor": "^0.5.0",
"react-share": "^1.19.1",
"react-stripe-checkout": "^1.8.0",
"redux": "^3.3.1",
"sendgrid": "^2.0.0",
"source-map-support": "0.4.0",
"stripe": "^4.25.0",
"tempy": "^0.2.1",
"twilio": "^2.9.1",
"twitter": "^1.7.0",
"underscore": "^1.8.3",
"whatwg-fetch": "0.10.1",
"xhr2": "^0.1.3"
},
"devDependencies": {
"assets-webpack-plugin": "^3.4.0",
"autoprefixer": "^6.1.2",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^6.0.4",
"babel-jest": "^22.4.1",
"babel-loader": "^6.2.4",
"babel-plugin-react-transform": "^2.0.2",
"babel-plugin-rewire": "^1.0.0-rc-3",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-react-constant-elements": "^6.8.0",
"babel-plugin-transform-react-inline-elements": "^6.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.2.7",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-env": "^1.6.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-node5": "^11.1.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.26.0",
"babel-template": "^6.26.0",
"babel-types": "^6.26.0",
"browser-sync": "^2.23.6",
"css-loader": "^0.28.10",
"csscomb": "^3.1.8",
"del": "^2.2.0",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.1.1",
"eslint-loader": "^1.1.1",
"eslint-plugin-react": "^3.11.3",
"extend": "^3.0.0",
"file-loader": "^0.8.5",
"gaze": "^0.5.2",
"git-repository": "^0.1.1",
"glob": "^6.0.1",
"jest": "^22.4.2",
"jest-cli": "^0.8.2",
"jscs": "^2.7.0",
"mkdirp": "^0.5.1",
"ncp": "^2.0.0",
"postcss": "^5.2.18",
"postcss-import": "^7.1.3",
"postcss-loader": "^0.8.0",
"precss": "^1.3.0",
"react-test-renderer": "^16.2.0",
"react-transform-catch-errors": "^1.0.0",
"react-transform-hmr": "^1.0.1",
"redbox-react": "1.2.0",
"replace": "^0.3.0",
"superagent": "^3.8.2",
"supertest": "^3.0.0",
"url-loader": "^0.5.7",
"webpack": "^1.13.0",
"webpack-hot-middleware": "^2.21.0",
"webpack-middleware": "^1.5.1",
"webpack-node-externals": "^1.6.0"
},
"babel": {
"presets": [
"react",
"node5",
"stage-0"
],
"env": {
"test": {
"plugins": [
"rewire"
]
}
},
"plugins": [
"transform-class-properties"
]
},
"jest": {
"rootDir": "./src"
},
"scripts": {
"lint": "eslint src tools && jscs src tools",
"csslint": "csscomb src/components --lint --verbose",
"csscomb": "csscomb src/components --verbose",
"test": "jest",
"clean": "babel-node tools/run clean",
"copy": "babel-node tools/run copy",
"bundle": "babel-node tools/run bundle",
"build": "babel-node tools/run build",
"deploy": "babel-node tools/run deploy",
"start": "babel-node tools/run start"
}
}

Related

running npm run build throws Error: Can't resolve 'Vue'

When running npm run build or nom run dev. the following error is produced.
ERROR in ./src/components/screens/login/login.js?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/eslint-loader??ref--0!./src/components/screens/login/login.js?vue&type=script&lang=js&)
Module not found: Error: Can't resolve 'Vue' in '/home/builder/build/release/projects/appschoolware/9.9.5/build/src/components/screens/login'
# ./src/components/screens/login/login.js?vue&type=script&lang=js& (./node_modules/babel-loader/lib!./node_modules/eslint-loader??ref--0!./src/components/screens/login/login.js?vue&type=script&lang=js&) 22:0-22 391:45-48
dont really understand, the reason for this..hope anyone can help.
My package.json is long so bear with me.
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
"test": "npm run unit",
"lint": "eslint --ext .js,.vue src test/unit",
"build": "node --max_old_space_size=1024 build/build.js"
},
"dependencies": {
"rrule": "^2.6.8",
"#babel/polyfill": "^7.8.3",
"#riophae/vue-treeselect": "^0.4.0",
"axios": "^0.18.1",
"babel-polyfill": "^6.26.0",
"expr-eval": "^1.2.3",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"flat": "^5.0.2",
"gradle": "^1.2.3",
"jquery": "^3.5.1",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"qrcode.vue": "^1.7.0",
"save": "^2.4.0",
"v-tooltip": "^2.0.3",
"vue": "^2.6.11",
"vue-autosuggest": "^2.0.4",
"vue-axios": "^2.1.5",
"vue-ctk-date-time-picker": "^2.4.0",
"vue-infinite-loading": "^2.4.4",
"vue-print-nb": "^1.5.0",
"vue-qrcode-reader": "^2.1.1",
"vue-radial-menu": "^1.1.1",
"vue-router": "^3.1.5",
"vue-select": "^2.6.4",
"vue-swatches": "^1.0.4",
"vue-sweetalert2": "^1.2.4",
"vue-the-mask": "^0.11.1",
"vue-touch": "^2.0.0-beta.4",
"vue2-editor": "^2.10.2",
"vue2-filters": "^0.11.0",
"vue2-touch-events": "^2.1.0",
"vuejs-datepicker": "^1.6.2",
"vuex": "^3.1.2"
},
"devDependencies": {
"#babel/cli": "^7.8.3",
"#babel/core": "^7.8.3",
"#babel/plugin-transform-function-name": "^7.8.3",
"#babel/preset-env": "^7.8.3",
"#vue/babel-preset-app": "^4.1.2",
"autoprefixer": "^9.7.4",
"babel-cli": "^6.26.0",
"babel-core": "^6.22.1",
"babel-eslint": "^10.0.3",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.5",
"babel-plugin-istanbul": "^5.2.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-latest": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-preset-vue": "^2.0.2",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^2.1.1",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.2.1",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^5.2.3",
"eventsource-polyfill": "^0.9.6",
"file-loader": "^3.0.1",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^3.2.0",
"inject-loader": "^4.0.1",
"karma": "^4.4.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-phantomjs-shim": "^1.4.0",
"karma-sinon-chai": "^2.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "^3.0.5",
"mini-css-extract-plugin": "^0.5.0",
"mocha": "^5.2.0",
"node-notifier": "^5.4.3",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"ora": "^3.4.0",
"phantomjs-prebuilt": "^2.1.14",
"portfinder": "^1.0.25",
"postcss-loader": "^3.0.0",
"rimraf": "^2.7.1",
"semver": "^5.7.1",
"shelljs": "^0.8.3",
"sinon": "^7.5.0",
"sinon-chai": "^3.4.0",
"transfer-webpack-plugin": "^0.1.4",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^1.1.2",
"vue-hot-reload-api": "^2.3.4",
"vue-loader": "^15.8.3",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.41.5",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.11.0",
"webpack-emit-all-plugin": "^2.0.1",
"webpack-merge": "^4.2.2"
},
"engines": {
"node": ">=12.13.0 <13.0.0",
"npm": ">= 6.12.0"
As you see in the file login.js there is a single line "import Vue from 'Vue' " and thats i think throwing the error..but in my localhost i dont see any issues.
import Vue from 'vue' was the solution...Capital letters matter!!! careful!

Cannot find module 'webpack/lib/web/FetchCompileWasmTemplatePlugin'

I have a Vue application which is running live and node version is 8. I have clone this application, I deleted the package.lock file and node_module folder, and run npm i, I have node 12.18 installed on my mechine, after successful installation, I try to run appplication by npm run dev, but getting error:
ERROR Failed to compile with 1 errors 11:14:59 AM
error in ./node_modules/pdfjs-dist/build/pdf.worker.js
Module build failed: Error: Cannot find module 'webpack/lib/web/FetchCompileWasmTemplatePlugin'
Require stack:
- C:\xampp\htdocs\easy-portal\node_modules\worker-loader\dist\index.js
- C:\xampp\htdocs\easy-portal\node_modules\worker-loader\dist\cjs.js
- C:\xampp\htdocs\easy-portal\node_modules\loader-runner\lib\loadLoader.js
- C:\xampp\htdocs\easy-portal\node_modules\loader-runner\lib\LoaderRunner.js
- C:\xampp\htdocs\easy-portal\node_modules\webpack\lib\NormalModule.js
- C:\xampp\htdocs\easy-portal\node_modules\webpack\lib\NormalModuleFactory.js
- C:\xampp\htdocs\easy-portal\node_modules\webpack\lib\Compiler.js
- C:\xampp\htdocs\easy-portal\node_modules\webpack\lib\webpack.js
- C:\xampp\htdocs\easy-portal\node_modules\webpack-dev-server\lib\Server.js
- C:\xampp\htdocs\easy-portal\node_modules\webpack-dev-server\bin\webpack-dev-server.js
here is my package.json file:
{
"name": "app",
"version": "1.0.0",
"description": "ATS System",
"author": "N4TECH",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "node server.js",
"build:dev": "node build/dev.js",
"build:prod": "node build/build.js"
},
"dependencies": {
"axios": "^0.17.1",
"bootstrap": "^3.3.7",
"bootstrap-vue": "^1.4.0",
"chalk": "^2.0.1",
"css-loader": "^0.28.8",
"debounce": "^1.1.0",
"express": "^4.16.3",
"express-static-gzip": "^0.3.2",
"jquery": "^3.3.1",
"lodash": "^4.17.5",
"moment": "^2.20.1",
"node-sass": "^4.7.2",
"pusher-js": "^4.3.1",
"raw-loader": "^0.5.1",
"sass-loader": "^6.0.6",
"tributejs": "^3.5.3",
"vee-validate": "^2.0.0-beta.17",
"vue": "^2.5.2",
"vue-clipboard2": "^0.3.1",
"vue-html5-editor": "^1.1.1",
"vue-i18n": "^8.1.0",
"vue-pdf": "^3.2.0",
"vue-router": "^3.0.1",
"vue-scrollto": "^2.11.0",
"vue-social-sharing": "^2.3.3",
"vue-style-loader": "^3.0.3",
"vue-truncate-collapsed": "^1.3.0",
"vue2-datatable-component": "^2.1.26",
"vuedraggable": "^2.16.0",
"vuetify": "^1.2.4",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.4.2"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"compression-webpack-plugin": "^1.1.6",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0",
"worker-loader": "^3.0.7"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Any help would be highly appreciable.
I fixed it by update webpack to webpack5

Webpack Broken after installing vuex-persistedstate

I have broken my webpack installation after installing vuex-persistedstate. I have removed the node modules folder and the package-lock.json file and re-installed, but I am still receiving the following error when trying to run my project:
npm ERR! client#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#1.0.0 dev script.
I have deleted the /node_modules folder and package-lock.json file, and ran the following commands:
npm install
npm run build
npm start
My package.json file contains the following packages:
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
"build": "node build/build.js"
},
"dependencies": {
"ajv": "^6.10.2",
"axios": "^0.19.0",
"babel-polyfill": "^6.26.0",
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.0.0",
"jquery": "^3.5.1",
"popper.js": "^1.15.0",
"vue": "^2.5.2",
"vue-cookies": "^1.5.13",
"vue-js-modal": "^1.3.31",
"vue-router": "^3.0.1",
"vuejs-dialog": "^1.4.1",
"vuex": "^3.5.1",
"vuex-persistedstate": "^3.0.1",
"web3": "^1.2.1"
},
"devDependencies": {
"#types/node": "^12.7.5",
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-istanbul": "^5.2.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chai": "^4.1.2",
"chalk": "^2.0.1",
"chromedriver": "^2.27.2",
"copy-webpack-plugin": "^6.0.3",
"cross-env": "^5.0.1",
"cross-spawn": "^5.0.1",
"css-loader": "^3.1.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"inject-loader": "^3.0.0",
"karma": "^5.1.1",
"karma-coverage": "^2.0.3",
"karma-mocha": "^2.0.1",
"karma-phantomjs-launcher": "^1.0.2",
"karma-phantomjs-shim": "^1.4.0",
"karma-sinon-chai": "^1.3.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.2",
"mini-css-extract-plugin": "^0.8.0",
"mocha": "^8.0.1",
"nightwatch": "^1.3.7",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"phantomjs-prebuilt": "^2.1.14",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"sinon": "^4.0.0",
"sinon-chai": "^2.8.0",
"style-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^2.1.0",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^4.44.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.3.8",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]

NodeJS Module build failed for thread-loader on Visual Studio 2019

Hi I am working on a NodeJS project on Visual Studio 2019 using npm. When I build the app it fails with following error
Building for production... ERROR Failed to compile with 1 errors20:53:01 error in ./src/main.js Module build failed (from
./node_modules/thread-loader/dist/cjs.js): Thread Loader (Worker 0)
[BABEL] C:\Projects\xxx\RedAir\redAir\src\main.js: .overrides
is not allowed in preset options
at PoolWorker.fromErrorObj (C:\Projects\xx\RedAir\redAir\node_modules\thread-loader\dist\WorkerPool.js:262:12)
at C:\Projects\xx\RedAir\redAir\node_modules\thread-loader\dist\WorkerPool.js:204:29
at mapSeries (C:\Projects\xx\RedAir\redAir\node_modules\neo-async\async.js:3625:14)
at Object.keys.forEach.key (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\validation\options.js:71:13)
at Array.forEach ()
at validate (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\validation\options.js:69:21)
at instantiatePreset (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\full.js:242:36)
at cachedFunction (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\caching.js:42:19)
at loadPresetDescriptor (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\full.js:233:45)
at config.presets.map.descriptor (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\full.js:68:19)
at Array.map ()
at recurseDescriptors (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\full.js:66:38)
at loadFullConfig (C:\Projects\xx\RedAir\redAir\node_modules#babel\core\lib\config\full.js:106:6)
# multi ./src/main.js ERROR Build failed with errors.
Here is my main.js
import Vue from 'vue';
import App from './App.vue';
Vue.config.productionTip = true;
new Vue({
render: h => h(App)
}).$mount('#app');
Here is Package.json
{
"author": {
"name": "HaBo"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"dependencies": {
"#babel/runtime-corejs3": "^7.7.4",
"#capacitor/core": "^1.3.0",
"#fortawesome/fontawesome-svg-core": "^1.2.25",
"#fortawesome/free-solid-svg-icons": "^5.11.2",
"#fortawesome/vue-fontawesome": "^0.1.8",
"#ionic/core": "^4.11.5",
"#ionic/vue": "0.0.4",
"#openlayers/pepjs": "^0.5.3",
"#sentry/browser": "^5.9.1",
"#sentry/core": "^5.8.0",
"#sentry/hub": "^5.8.0",
"#sentry/integrations": "^5.8.0",
"#sentry/minimal": "^5.8.0",
"#sentry/types": "^5.7.1",
"#sentry/utils": "^5.8.0",
"#vue/babel-preset-app": "^4.1.1",
"amazon-cognito-identity-js": "^3.2.0",
"amazon-cognito-js": "^1.1.0",
"aws-sdk": "^2.581.0",
"axios": "^0.19.0",
"axios-extensions": "^3.0.6",
"base64-js": "^1.3.1",
"buffer": "^5.4.3",
"core-js": "^3.4.5",
"core-js-pure": "^3.4.5",
"crypto-js": "^3.1.9-1",
"d3": "^5.14.2",
"d3-array": "^2.4.0",
"d3-axis": "^1.0.12",
"d3-brush": "^1.1.5",
"d3-chord": "^1.0.6",
"d3-collection": "^1.0.7",
"d3-color": "^1.4.0",
"d3-contour": "^1.3.2",
"d3-dispatch": "^1.0.6",
"d3-drag": "^1.2.5",
"d3-dsv": "^1.2.0",
"d3-ease": "^1.0.6",
"d3-fetch": "^1.1.2",
"d3-force": "^2.0.1",
"d3-format": "^1.4.2",
"d3-geo": "^1.11.9",
"d3-hierarchy": "^1.1.9",
"d3-interpolate": "^1.4.0",
"d3-path": "^1.0.9",
"d3-polygon": "^1.0.6",
"d3-quadtree": "^1.0.7",
"d3-random": "^2.0.1",
"d3-scale": "^3.2.1",
"d3-scale-chromatic": "^1.5.0",
"d3-selection": "^1.4.1",
"d3-shape": "^1.3.7",
"d3-time": "^1.1.0",
"d3-time-format": "^2.2.2",
"d3-timer": "^1.0.10",
"d3-tip": "^0.9.1",
"d3-transition": "^1.3.2",
"d3-voronoi": "^1.1.4",
"d3-zoom": "^1.8.3",
"dom7": "^2.1.3",
"ieee754": "^1.1.13",
"inherits": "^2.0.4",
"ionicons": "^4.6.3",
"is-buffer": "^2.0.4",
"isarray": "^2.0.5",
"jmespath": "^0.15.0",
"js-cookie": "^2.2.1",
"leaflet": "^1.6.0",
"leaflet-arc": "^1.0.2",
"leaflet-easybutton": "^2.4.0",
"line-clamp": "^1.0.0",
"lru-cache": "^5.1.1",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"node-libs-browser": "^2.2.1",
"ol": "^6.1.1",
"olcs": "^2.10.0",
"path-browserify": "^1.0.0",
"pseudomap": "^1.0.2",
"q": "^1.5.1",
"querystring-es3": "^0.2.1",
"rbush": "^3.0.1",
"regenerator-runtime": "^0.13.3",
"secure-ls": "^1.2.5",
"ssr-window": "^1.0.1",
"swiper": "^5.2.1",
"thread-loader": "^2.1.3",
"three": "^0.111.0",
"tslib": "^1.10.0",
"underscore": "^1.9.1",
"util": "^0.12.1",
"uuid": "^3.3.3",
"vue-loader": "^15.7.2",
"vue-router": "^3.1.3",
"vue-tour": "^1.1.0",
"wicket": "^1.3.5",
"yallist": "^4.0.0"
},
"description": "redAir",
"devDependencies": {
"#vue/cli-plugin-babel": "3.0.4",
"#vue/cli-plugin-eslint": "3.0.4",
"#vue/cli-service": "3.0.4",
"eslint": "5.6.0",
"eslint-plugin-vue": "4.7.1",
"vue": "^2.6.10",
"vue-template-compiler": "2.5.17"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"name": "red-air",
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"version": "0.1.0"
}
How do I overcome this issue and build it successfully?

Errors prevented bundling: While processing files with ecmascript (for target web.browser):

I tried to run the command meteor build --directory . to build a bundle directory for the meteor app then I got errors like as follows:
Errors prevented bundling:
While processing files with ecmascript (for target web.browser):
/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules/
#babel/core/lib/config/validation/option-assertions.js:146:13:
[BABEL] bundle/programs/web.browser/app/scripts/vendor/modernizr.js: .plugins[0] may only be a two-tuple or three-tuple
at assertPluginItem
(/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules
/#babel/core/lib/config/validation/option-assertions.js:146:13)
at
/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules/
#babel/core/lib/config/validation/option-assertions.js:132:14
at Array.forEach (<anonymous>)
at assertPluginList
(/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules
/#babel/core/lib/config/validation/option-assertions.js:131:9)
at
/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules/
#babel/core/lib/config/validation/options.js:83:20
at Array.forEach (<anonymous>)
at validate
(/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules
/#babel/core/lib/config/validation/options.js:61:21)
at
/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules/
#babel/core/lib/config/index.js:246:36
at cachedFunction
(/home/takhi_abed/.meteor/packages/ecmascript/.0.10.2.113xul7.mfme++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/babel-compiler/node_modules
/#babel/core/lib/config/caching.js:40:17)
at loadPresetDescriptor...and more lines like these. I looked into some issues on stackoverflow and github and found some commands like meteor npm install --save babel-runtime and tried them but still the same errors show up. It would be great if someone can help.
Here is the .babelrc file:
```
{
"presets": [
],
"plugins": [
[
"transform-class-properties",
"babel-plugin-inline-import",
"babel-plugin-inline-import-graphql-ast",
{
"extensions": [
".graphqls",
".graphql"
]
}
]
]
}```
and here is package.json file:
```{
"name": "enliven-frontend",
"version": "1.8.9",
"engines": {
"npm": "^3.0"
},
"scripts": {
"prestart": "sh prestart_vulcan.sh",
"start": "meteor --settings settings-development.json",
"start-the-show": "meteor --settings settings-production.json",
"lint": "eslint --cache --ext .jsx,js packages"
},
"dependencies": {
"#babel/runtime": "^7.0.0-beta.55",
"analytics-node": "^2.4.1",
"apollo-client": "^1.9.1",
"apollo-engine": "^0.5.4",
"apollo-errors": "^1.4.0",
"apollo-server-express": "^1.3.2",
"bcrypt": "^1.0.3",
"body-parser": "^1.18.2",
"chalk": "2.2.0",
"classnames": "^2.2.5",
"cloudflare": "^2.4.1",
"compression": "^1.7.1",
"cookie-parser": "^1.4.3",
"cross-fetch": "^0.0.8",
"crypto-js": "^3.1.9-1",
"dataloader": "^1.3.0",
"deepmerge": "^1.5.0",
"escape-string-regexp": "^1.0.5",
"express": "^4.15.4",
"flat": "^4.0.0",
"formsy-react": "^0.19.5",
"formsy-react-components": "^0.11.1",
"graphql": "^0.10.5",
"graphql-anywhere": "^3.0.1",
"graphql-date": "^1.0.2",
"graphql-tag": "^2.0.0",
"graphql-tools": "^2.19.0",
"graphql-type-json": "^0.1.4",
"handlebars": "^4.0.10",
"he": "^1.1.1",
"history": "^3.3.0",
"html-to-text": "^2.1.3",
"immutability-helper": "^2.3.1",
"import": "0.0.6",
"install": "^0.10.1",
"intl": "^1.2.5",
"intl-locales-supported": "^1.0.0",
"isomorphic-fetch": "^2.2.1",
"json-path": "^0.1.3",
"juice": "^1.11.0",
"lodash": "^4.17.5",
"mailchimp": "^1.2.0",
"marked": "^0.3.9",
"metascraper": "^1.0.7",
"meteor-node-stubs": "^0.3.2",
"mingo": "^0.8.1",
"moment": "^2.18.1",
"new-relic-agent-react": "^2.0.1",
"optics-agent": "^1.1.6",
"photoswipe": "^4.1.2",
"prop-types": "^15.5.10",
"rangy": "^1.3.0",
"react": "^16.2.0",
"react-addons-pure-render-mixin": "^15.6.0",
"react-apollo": "^1.4.15",
"react-bootstrap": "^0.32.0",
"react-bootstrap-datetimepicker": "0.0.22",
"react-cookie": "^0.4.9",
"react-country-region-selector": "^1.1.0",
"react-datetime": "^2.11.1",
"react-dfp": "^0.7.5",
"react-dom": "^16.2.0",
"react-dropzone": "^3.13.4",
"react-flexview": "^1.0.13",
"react-headroom": "^2.2.1",
"react-helmet": "^5.2.0",
"react-image-smooth-loading": "^2.0.0",
"react-intl": "^2.3.0",
"react-lazyload": "^2.3.0",
"react-load-script": "0.0.6",
"react-loadable": "^4.0.4",
"react-masonry-component": "^5.0.7",
"react-places-autocomplete": "^5.4.2",
"react-progressive-image-loading": "^3.0.2",
"react-redux": "^5.0.6",
"react-router": "^3.2.0",
"react-router-bootstrap": "^0.23.3",
"react-router-scroll": "^0.4.4",
"react-sidebar": "^2.3.2",
"react-stripe-checkout": "^2.4.0",
"react-swipeable": "^4.3.0",
"recompose": "^0.26.0",
"redux": "^3.7.2",
"rss": "^1.2.2",
"sanitize-html": "^1.16.3",
"sendy-api": "^0.1.0",
"simpl-schema": "^0.2.3",
"sitemap": "^1.13.0",
"speakingurl": "^9.0.0",
"stripe": "^4.24.0",
"styled-components": "^2.1.2",
"tracker-component": "^1.3.21",
"twit": "^2.2.9",
"underscore": "^1.8.3",
"url": "^0.11.0"
},
`` "private": true,
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-eslint": "^7.0.0",
"babel-plugin-inline-import": "^2.0.6",
"babel-plugin-inline-import-graphql-ast": "^2.0.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"compass-sass-mixins": "^0.12.7",
"eslint": "^3.10.1",
"eslint-config-airbnb": "^13.0.0",
"eslint-config-meteor": "0.0.9",
"eslint-import-resolver-meteor": "^0.3.3",
"eslint-plugin-babel": "^3.3.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-meteor": "^4.0.1",
"eslint-plugin-prettier": "^2.5.0",
"eslint-plugin-react": "^6.7.1"
},
"postcss": {
"plugins": {
"postcss-easy-import": {
"extensions": [
".css",
".scss",
".import.css"
],
"prefix": "_"
},
"postcss-simple-vars": {},
"postcss-sassy-mixins": {},
"postcss-nested": {},
"autoprefixer": {
"browsers": [
"last 2 versions"
]
}
},
"parser": "postcss-scss"
},
"cssModules": {
"ignorePaths": [
"node_modules",
"bower_components"
]
},
"description": "## Requirements",
"main": "mobile-config.js",
"repository": {
"type": "git",
"url": "git+ssh://git#gitlab.com/enliven/enliven-frontend.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://gitlab.com/enliven/enliven-frontend/issues"
},
"homepage": "https://gitlab.com/enliven/enliven-frontend#README"
}```
I don’t think that you are able to create a bundle into the . folder.
You are meant to pass it the folder in which to store the bundled files which must be different. I would suggest that you create a .bundle folder and pass that to the bundle command. The dot is important because meteor will ignore folders and files beginning with a dot

Resources