Why is crashReporter undefined in Electron? - javascript

I recently upgraded to Electron version 1.6.11 and now when I run my npm start command, I get the following error:
The top of my main.js file looks like this:
const {app, BrowserWindow, ipcMain, crashReporter} = require('electron');
const path = require('path');
crashReporter.start({
productName: 'MyCo',
companyName: 'MyCo, Inc.',
submitURL: 'https://myco.co/fake-url-to-submit',
uploadToServer: true
});
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {
app.quit();
}
});
Here are the contents of my package.json file:
{
"name": "MyApp",
"productName": "MyApp",
"version": "0.0.1",
"main": "main.js",
"repository": "https://github.com/zackshapiro/myApp",
"devDependencies": {
"babel-core": "^6.7.2",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-3": "^6.17.0",
"css-loader": "^0.23.1",
"electron": "^1.6.11",
"electron-packager": "^8.7.1",
"electron-rebuild": "^1.1.3",
"eslint": "^3.13.1",
"eslint-loader": "^1.6.1",
"eslint-plugin-react": "^6.9.0",
"file-loader": "^0.10.1",
"node-libs-browser": "^1.0.0",
"node-sass": "^4.2.0",
"sass-loader": "^4.1.1",
"style-loader": "^0.13.0",
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.4"
},
"scripts": {
"start": "./node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron .",
"watch": "./node_modules/.bin/webpack-dev-server",
"electron-rebuild": "./node_modules/.bin/electron-rebuild"
},
"dependencies": {
"babel-polyfill": "^6.22.0",
"electron-context-menu": "^0.8.0",
"electron-prebuilt": "^0.37.2",
"gl-react": "^2.2.9",
"gl-react-hue-rotate": "^1.1.0",
"isomorphic-fetch": "^2.2.1",
"rc-slider": "^6.1.0",
"react": "15.4.2",
"react-dnd": "^2.2.4",
"react-dnd-html5-backend": "^2.2.4",
"react-dom": "15.4.2",
"react-redux": "^5.0.2",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1",
"react-router-redux": "^5.0.0-alpha.6",
"redux": "^3.6.0",
"redux-saga": "^0.14.3",
"tinycolor2": "^1.4.1"
}
}
How do I fix this and get crashReporter working?

Your start script is wrong -- you're trying to use electron-prebuilt which is outdated, but you probably forgot to uninstall it from your computer so it still works. It's currently in your devDependencies but it's been deprecated and hasn't been supported since 2016. Remove it with:
npm uninstall --save-dev electron-prebuilt
electron-prebuilt does not come with crashReporter thus it is undefined when you try to import it.
You should be using the latest electron you've installed which comes with crashReporter. To do this, change the script to (if you've installed it locally):
"start": "./node_modules/.bin/electron ."
This will use electron instead of electron-prebuilt and it should work fine.

Related

Aframe JS Error Could not load module '../GetIntrinsic'

After running npm start I receive the following error:
error: Processing of node_modules/aframe/dist/aframe-master.js failed. Error: Could not load module '../GetIntrinsic' from '/root/immerso-experience/node_modules/aframe/dist'. Make sure the file actually exists.
Here is the package.json
{
"name": "experience-engine",
"description": "Immerso Experience Engine",
"private": true,
"author": "Immerso",
"homepage": "https://immerso.io",
"version": "1.3.0",
"scripts": {
"start": "export DEVELOPMENT=true && brunch w -n -s -P 3000",
"build": "rm -rf public/ && brunch build --production && node -e 'require(\"./post-build.js\").readWriteSync()'",
"preinstall": "npx npm-force-resolutions || echo"
},
"jest": {
"globals": {
"$PROCESS_ENV_API_URL": "https://api.immersotours.com",
"$PROCESS_ENV_WS_API_URL": null,
"$PROCESS_ENV_RECAPTCHA_KEY": null,
"$PROCESS_ENV_PAYPAL_CLIENT_ID": "ARbzpX1BmPBEJ37OXso7sdXACVyufeAZ4ovJLziEILohedwfwNNvXIpelUJSG64U65QjDn_lfXHa4P3E",
"$PROCESS_ENV_AES_KEY": "secret-key",
"$PROCESS_ENV_DEVELOPMENT": true
}
},
"dependencies": {
"aframe": "^1.3.0",
"aframe-event-set-component": "^3.0.3",
"aframe-fit-texture-component": "^0.2.5",
"aframe-look-at-component": "1.0.0",
"aframe-particle-system-component": "^1.1.3",
"aframe-react": "^4.4.0",
"aframe-scene-look-controls": "^1.0.5",
"aframe-video-controls": "^0.3.0",
"animate.css": "^4.1.1",
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"braces": "^2.3.1",
"brunch": "^3.0.0",
"crypto-js": "^4.0.0",
"dotenv": "^8.2.0",
"howler": "^2.2.0",
"json": "^11.0.0",
"kill-port-process": "^2.3.0",
"prerender-node": "^3.2.5",
"process-env-brunch": "^1.4.6",
"prop-types": "^15.8.1",
"react": "^16.13.1",
"react-async-script-loader": "^0.3.0",
"react-bootstrap": "^1.4.3",
"react-device-detect": "^1.17.0",
"react-dom": "^16.14.0",
"react-ga": "^3.3.0",
"react-google-invisible-recaptcha": "^0.2.11",
"react-google-login": "^5.2.2",
"react-helmet": "^6.1.0",
"react-i18next": "^9.0.10",
"react-intl": "^5.12.1",
"react-modal": "^3.12.1",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.0",
"react-share": "^4.4.0",
"react-tooltip": "^4.2.13",
"sass-brunch": "^3.0.0",
"socket.io": "^3.1.1",
"ssri": "^8.0.1",
"use-strict": "^1.0.1",
"websocket": "^1.0.31"
},
"devDependencies": {
"#babel/core": "^7.12.13",
"#babel/plugin-transform-runtime": "^7.12.15",
"#babel/plugin-transform-strict-mode": "^7.12.13",
"#babel/preset-env": "^7.12.13",
"#babel/preset-react": "^7.12.13",
"#babel/register": "^7.12.13",
"#babel/runtime-corejs2": "^7.12.13",
"auto-reload-brunch": "^2.7.1",
"babel-brunch": "^7.0.1",
"babel-jest": "^26.6.3",
"babel-preset-latest": "^6.24.1",
"babel-preset-react": "^6.24.1",
"clean-css-brunch": "^3.0.0",
"esm": "^3.2.25",
"express": "^4.17.1",
"fingerprint-brunch": "^2.0.7",
"fs": "0.0.1-security",
"npm-force-resolutions": "0.0.3",
"react-addons-test-utils": "^15.6.2",
"react-notifications-component": "^3.0.3",
"riteway": "^6.2.1",
"uglify-es-brunch": "^1.0.5"
},
"main": ".eslintrc.js",
"repository": {
"type": "git",
"url": "git+https://ImmersoTech#bitbucket.org/ImmersoTech/immerso-experience.git"
},
"license": "ISC"
}
NPM version 7.19.1
Node version 16.5.0
Note: I am using a deprecated library called react-aframe which may or may not affect it. I imagine it might since it is so old. I have tried looking in github and stackoverflow for similar issues but could not find it
I ran this command
grep GetIntrinsic node_modules/aframe/dist/aframe-master.js
to see where GetIntrinsic is used and it is imported a couple of times with require(). From looking at the function itself it seems to just get a value based off of a key from the INTRINSINCS object.

how to resolve dependency issue: "npm run dev" not working

I have a vue based application, I am trying to run that application by using command npm run dev but it is giving me the below error:
This dependency was not found:
These dependencies were not found:
* module in (webpack)/lib/node/NodeTargetPlugin.js
* webpack/lib/web/FetchCompileWasmTemplatePlugin in ./node_modules/worker-loader/dist/index.js
To install them, you can run: npm install --save module webpack/lib/web/FetchCompileWasmTemplatePlugin
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'
below is my package.json
{
"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",
"chokidar": "^3.4.2",
"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-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.12.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0",
"worker-loader": "^3.0.3"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
I also tried by deleting node_modules folder, run clean cache i.e npm cache clean --force, and then reinstall but no luck. I am stuck on this issue. Any help would by highly appreciable.

NextJS redux-saga sample code doesn't work with redux-saga ^1.0.0?

I'm working on connecting Next.js and redux-saga in a large existing React project. I am following the Next.js sample code for this. The sample code works fine, but when I tried to move the Next.js redux-saga sample code -- https://github.com/zeit/next.js/tree/master/examples/with-redux-saga --, my data wasn't getting stored in the store. I'm not sure if my action to store it is being called, or if it's being called late, but I end up with an empty store.
I was tracing through the output and saw that the redux-saga task seems to have a done field with the sample code, but with my code it has a toPromise field.
The only obvious difference I could see between the two projects was that the sample code uses redux-saga 0.16.0 and my project uses ^1.0.0.
When I switched my project to use redux-saga 0.16.0 it works fine.
Perhaps next-redux-saga, on which both of these projects depends, is looking for the done field? Could it be something else? I attach the two package.json fields, in case you spot something I didn't. Thanks for any help!
Sample code package.json
{
"name": "with-redux-saga",
"version": "1.0.0",
"license": "ISC",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"es6-promise": "4.1.1",
"isomorphic-unfetch": "2.0.0",
"next": "^7.0.2",
"next-redux-saga": "3.0.0",
"next-redux-wrapper": "2.0.0",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-redux": "5.0.7",
"redux": "4.0.0",
"redux-saga": "^1.0.0"
},
"devDependencies": {
"redux-devtools-extension": "2.13.2"
}
}
My package.json
{
"name": "PAW-React",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/InterficieIS/PAW-React.git",
"author": "Javier1177 <javierlopezblasco#gmail.com>",
"license": "MIT",
"dependencies": {
"#date-io/date-fns": "^1.0.1",
"#material-ui/core": "^3.8.3",
"autoprefixer": "7.1.5",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-wrap-in-js": "^1.1.0",
"bulma": "^0.6.2",
"date-fns": "^2.0.0-alpha.27",
"dotenv": "^4.0.0",
"eslint-config-airbnb": "^17.1.0",
"express": "^4.16.4",
"glob": "^7.1.2",
"isomorphic-unfetch": "^3.0.0",
"jss": "^9.8.7",
"material-ui-pickers": "^2.1.1",
"next": "^7.0.2",
"next-fonts": "^0.16.0",
"next-redux-saga": "^3.0.0",
"next-redux-wrapper": "^2.1.0",
"node-sass": "^4.4.0",
"normalize.css": "^7.0.0",
"prop-types": "^15.6.2",
"raw-loader": "^0.5.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-jss": "^8.6.1",
"react-redux": "^6.0.0",
"react-slick": "^0.23.2",
"redux": "^4.0.1",
"redux-saga": "^1.0.0",
"sass-loader": "^6.0.6",
"slick-carousel": "^1.8.1"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"command-line-args": "^4.0.7",
"cross-env": "^5.1.3",
"eslint": "^5.12.0",
"eslint-config-react-app": "^2.1.0",
"eslint-plugin-flowtype": "^2.41.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.5.1",
"file-loader": "^3.0.1",
"url-loader": "^1.1.2",
"redux-devtools-extension": "^2.13.7"
},
"scripts": {
"dev": "PORT=3001 node server.js",
"build": "next build",
"start": "NODE_ENV=production node server.js",
"export": "next export",
"eslint": "eslint . --ext=\"js,jsx\""
}
}
The react-redux release 1.0.0 brings along API breaking changes which aren't yet implemented in those project. Please keep track of the following issues and pull-requests to know more:
https://github.com/zeit/next.js/pull/6109
https://github.com/bmealhouse/next-redux-saga/issues/27
https://github.com/bmealhouse/next-redux-saga/pull/29
Best Regards

npm ERR! 404 Not Found: #babel/preset-vue#^7.1.0

I am developing simple website by using Ruby on Rails and Vue.js and I having trouble with starting local server. When I run on the terminal npm run dev it gives me 2 errors:
This dependency was not found:
* /Users/muchacho/RoRProjects/crm/crm-vue/node_modules/webpack-dev-server/client/index.js?http://localhost:8080 in multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/main.js
and second one:
This relative module was not found:
* ./src/main.js in multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/main.js
I thought that there are some missing dependencies or packages, so I run on the terminal npm install, it gives me another error:
npm ERR! 404 Not Found: #babel/preset-vue#^7.1.0
I tried to install #babel/preset-vue, but there is no such package.
My question is how to fix this problem, is it problem with node.js, vue.js or with npm ?
If you need additional information or file - I can upload source code.
UPD
Here is my package.json file:
{"name": "crm-vue",
"version": "1.0.0",
"description": "Frontend to crm",
"author": "",
"private": true,
"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 build/build.js"
},
"dependencies": {
"#babel/preset-react": "^7.0.0",
"#fortawesome/fontawesome-svg-core": "^1.2.4",
"#fortawesome/free-solid-svg-icons": "^5.3.1",
"#fortawesome/vue-fontawesome": "^0.1.1",
"axios": "^0.18.0",
"bootstrap-vue": "^2.0.0-rc.11",
"i": "^0.3.6",
"npm": "^6.4.1",
"vue": "^2.5.17",
"vue-axios": "^2.1.3",
"vue-router": "^3.0.1",
"vue-sweetalert2": "^1.5.3",
"vuejs-datepicker": "^1.5.3",
"vuejs-paginator": "^2.0.2",
"vuelidate": "^0.7.4",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.5.4"
},
"devDependencies": {
"#babel/core": "^7.1.2",
"#babel/preset-env": "^7.1.0",
"autoprefixer": "^9.1.5",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^8.0.4",
"babel-plugin-istanbul": "^5.0.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.7.0",
"babel-preset-stage-2": "^6.22.0",
"babel-preset-stage-3": "^6.24.1",
"babel-preset-vue": "^2.0.2",
"chai": "^4.2.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.1",
"css-loader": "^1.0.0",
"eslint": "^5.6.1",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^4.7.1",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^2.0.0",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^3.2.0",
"inject-loader": "^4.0.1",
"karma": "^3.0.0",
"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",
"mocha": "^5.2.0",
"node-notifier": "^5.1.2",
"node-sass": "^4.9.3",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"ora": "^3.0.0",
"phantomjs-prebuilt": "^2.1.14",
"portfinder": "^1.0.17",
"postcss-import": "^12.0.0",
"postcss-loader": "^3.0.0",
"postcss-url": "^8.0.0",
"rimraf": "^2.6.0",
"sass-loader": "^7.1.0",
"semver": "^5.5.1",
"shelljs": "^0.8.2",
"sinon": "^6.3.4",
"sinon-chai": "^3.2.0",
"uglifyjs-webpack-plugin": "^2.0.1",
"url-loader": "^1.1.1",
"vue-loader": "^15.4.2",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.5.17",
"webpack": "^4.20.2",
"webpack-bundle-analyzer": "^3.0.2",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.9",
"webpack-merge": "^4.1.4"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
In my point of view, there was internet connection trouble, so packages didn't downloaded properly. Issue was solved by reinstalling Vue.js and other packages.

Pulled from remote repo and getting: "Parsing error: The keyword 'import' is reserved"

I get the following error:
ERROR in ./src/main.js
error Parsing error: The keyword 'import' is reserved
/Users/staging/Desktop/sourcetree/viewer_web/src/main.js:1:1
import Vue from 'vue'
For some reason the ES6 feature in my project is not being recognized?
I'm using Node 5.0 and this is my package.json:
{
"name": "istaging-viewer",
"description": "A Vue.js project",
"author": "Alex <alexchen.info#gmail.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "rimraf dist && webpack --progress --hide-modules --config build/webpack.prod.conf.js",
"test": "karma start build/karma.conf.js --single-run"
},
"dependencies": {
"aframe": "mozvr/aframe#dev",
"bootstrap": "^3.3.6",
"jquery": "^2.2.1",
"lodash": "^4.4.0",
"vue": "^1.0.16",
"vue-resource": "^0.7.0",
"vue-router": "^0.7.11"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-runtime": "^5.8.0",
"bootstrap-webpack": "0.0.5",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.23.1",
"eslint": "^1.10.3",
"eslint-friendly-formatter": "^1.2.2",
"eslint-loader": "^1.2.0",
"eslint-plugin-html": "^1.3.0",
"eventsource-polyfill": "^0.9.6",
"exports-loader": "^0.6.3",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.4",
"function-bind": "^1.0.2",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.8.1",
"imports-loader": "^0.6.5",
"inject-loader": "^2.0.1",
"jasmine-core": "^2.4.1",
"json-loader": "^0.5.4",
"karma": "^0.13.15",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.24",
"karma-webpack": "^1.7.0",
"less": "^2.6.0",
"less-loader": "^2.2.2",
"phantomjs-prebuilt": "^2.1.3",
"rimraf": "^2.5.0",
"style-loader": "^0.13.0",
"stylus": "^0.53.0",
"stylus-loader": "^1.5.1",
"url-loader": "^0.5.7",
"vue-hot-reload-api": "^1.2.0",
"vue-html-loader": "^1.0.0",
"vue-loader": "^8.1.3",
"vue-style-loader": "^1.0.0",
"webpack": "^1.12.2",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.0"
}
}
What's a possible solution?
I thought it was a problem caused by eslint so I installed it globally but it didn't solve the problem.
You should add this to your .eslintrc file:
"parser": "babel-eslint"
This will fix your issue.
Node still uses common.js for modules. Take a look here https://nodejs.org/en/docs/es6/ for all the es6 supported features in node. If you want to use es6 imports you may have to use babel-node

Categories