cshelswell's avatar

Mix error on run npm dev

Hi I'm getting this error every time I "run npm dev"

undefined:1
"presets": [
         ^

SyntaxError: Unexpected token : in JSON at position 9

Strange thing is this works just fine on my other computer. I'm on Node 8.2.1 and my package.json is:

{
  "private": true,
  "scripts": {
    "dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "axios": "^0.16.2",
    "foundation-sites": "6.3.1",
    "jquery": "^3.2.1",
    "laravel-mix": "^1.3.1",
    "lodash": "^4.17.4",
    "cross-env": "^5.0.1",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-latest": "^6.22.0"
  },
  "bin": {
    "cross-env": "dist/bin/cross-env.js"
  }
}

Which again is exactly the same as my other computer which is working just fine.

I've tried deleting all the node_modules folder and running "npm install" again but no joy.

Any ideas would be really helpful - thanks

0 likes
0 replies

Please or to participate in this conversation.