Related
I am trying to run npm run dev on one of my projects and getting **Module not found: Error: Can't resolve '../dist/helpers.esm' in node_modules/chart.js/helpers
You can see here => https://i.stack.imgur.com/wZc3o.png
Package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"serve": "php artisan serve",
"clear-cache": "php artisan optimize:clear && composer dump-autoload && composer cc && npm cache clean --force"
},
"devDependencies": {
"axios": "^0.21.1",
"bootstrap": "^4.0.0",
"cross-env": "^5.2.1",
"jquery": "^3.2",
"laravel-mix": "^6.0.43",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^5.0.0",
"sass-loader": "^12.6.0",
"vue": "^2.5.7",
"vue-loader": "^15.9.8"
},
"dependencies": {
"chart.js": "^3.8.0",
"chartjs-plugin-datalabels": "^2.0.0",
"css-percentage-circle": "^2.0.1",
"echarts": "^5.3.2",
"jspdf": "^2.3.1",
"jspdf-autotable": "^3.5.15",
"laravel-echo": "^1.11.7",
"moment": "^2.29.1",
"moment-timezone": "^0.5.32",
"node-sass": "^7.0.1",
"npm": "^8.6.0",
"pdf-lib": "^1.17.1",
"percircle": "^1.0.28",
"percircle-vue": "^0.1.2",
"pusher-js": "^7.1.0-beta",
"tinymce": "^5.7.1",
"v-charts": "^1.17.10",
"v-skeletor": "^0.0.4",
"v-slim-dialog": "0.0.10",
"vue-axios": "^2.1.4",
"vue-chartjs": "^4.0.0",
"vue-codemirror": "^4.0.6",
"vue-confirm-dialog": "^1.0.2",
"vue-css-percentage-circle": "^2.0.0",
"vue-js-modal": "^2.0.1",
"vue-month-picker": "^1.5.0",
"vue-multiselect": "^2.1.6",
"vue-router": "^3.4.9",
"vue-step-progress": "^0.3.7",
"vue-tinymce-editor": "^1.6.2",
"vue-toast-notification": "^0.6.2",
"vue2-daterange-picker": "^0.6.8",
"vuedraggable": "^2.24.3",
"vuejs-datepicker": "^1.6.2",
"vuejs-dialog": "^1.4.2",
"vuex-persistedstate": "^3.0.0",
"yan-progress": "^1.0.3"
}
}
Node version install on my system is 18.0.0 and npm is 8.6.0
It was working just fine but now its not
When I do npm link like this in Window 10:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react
In my app when I do import { useSnackbar } from 'notistack'; then I can use the notistack ok, and it's the global notistack. I want to modify it debug it locally so I forked it and did the npm link but when I npm start the the App get the "You might have more than one copy of React in the same app " error. I also test this and it's true so that's why I do the npm link react and it's also recommended so I don't know what I do wrong here
To be able to debug notistack in VSCode and use the notistack in my app in VSCode. I do npm link. I get the Duplicate React error so must npm link the App react version and tell notistack to us the app react.
But I get this error: I do this npm link on other library's without problem but now this error:
I have tried to fixed this but it's not working.
I also do:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react-dom
And that is resolving ok.
I fork the notistack library and is using it ok in the app but only when I do npm link it fails. What is the problem here I guess it's in the package.json
Here is the package.json for the forked library notistack:
{
"name": "notistack",
"version": "1.0.10",
"description": "Highly customizable notification snackbars (toasts) that can be stacked on top of each other",
"main": "dist/index.js",
"module": "dist/notistack.esm.js",
"types": "dist/index.d.ts",
"license": "MIT",
"author": {
"name": "Hossein Dehnokhalaji",
"email": "hossein.dehnavi98#yahoo.com",
"url": "https://github.com/iamhosseindhv/notistack"
},
"homepage": "https://www.iamhosseindhv.com/notistack",
"repository": {
"url": "git+https://github.com/iamhosseindhv/notistack.git",
"type": "git"
},
"scripts": {
"build": "tsdx build --transpileOnly --entry ./src/index.js",
"prebuild": "npm run docs",
"prepublishOnly": "npm run build",
"docs": "rimraf typedoc.json && typedoc --tsconfig",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"peerDependencies": {
"#material-ui/core": "^4.11.2",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"#babel/preset-react": "^7.8.3",
"#material-ui/core": "^4.9.5",
"#types/node": "^13.9.0",
"#types/react": "^16.9.23",
"#types/react-dom": "^16.9.5",
"#types/react-is": "^16.7.1",
"#typescript-eslint/eslint-plugin": "^3.9.1",
"#typescript-eslint/parser": "^3.9.1",
"babel-plugin-optimize-clsx": "^2.6.1",
"eslint": "^7.7.0",
"eslint-config-airbnb": "~18.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
"rimraf": "^3.0.2",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-copy": "^3.3.0",
"tsdx": "^0.13.2",
"typedoc": "^0.16.11",
"typescript": "^3.8.3"
},
"dependencies": {
"clsx": "^1.1.0",
"hoist-non-react-statics": "^3.3.0"
},
"bugs": {
"url": "https://github.com/iamhosseindhv/notistack/issues"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/notistack"
},
"contributors": [
"Hossein Dehnokhalaji (https://www.iamhosseindhv.com/)"
],
"keywords": [
"notistack",
"enqueueSnackbar",
"snackbarprovider",
"useSnackbar",
"multiple",
"react",
"javascript",
"material-ui",
"toast",
"redux",
"snackbar",
"stacked",
"notification",
"material design",
"hossein",
"dehnokhalaji",
"iamhosseindhv"
]
}
Here is the package.json for the app using the library:
{
"name": "greta-thunberg-fff",
"version": "1.2.9",
"private": true,
"homepage": "https://greta.portplays.com",
"main": "index.js",
"module": "dist/index.js",
"files": [
"dist",
"README.md"
],
"dependencies": {
"#material-ui/core": "^4.11.2",
"#material-ui/icons": "^4.11.2",
"#material-ui/lab": "^4.0.0-alpha.57",
"#material-ui/styles": "^4.11.2",
"axios": "^0.19.2",
"bootstrap": "^4.5.2",
"change-case": "^4.1.2",
"classnames": "^2.3.1",
"clean-tag": "^3.1.1",
"clsx": "^1.1.1",
"comma-separated-values": "^3.6.4",
"crypto-js": "^4.0.0",
"date-fns": "^2.23.0",
"faker": "^5.5.3",
"firebase": "^7.23.0",
"formik": "^2.2.5",
"framer-motion": "^2.9.5",
"gsap": "^3.5.1",
"history": "^5.0.0",
"i": "^0.3.6",
"lodash": "^4.17.19",
"lodash.debounce": "^4.0.8",
"mammoth": "^1.4.11",
"material-table": "^1.69.2",
"moment": "^2.27.0",
"normalize-wheel": "^1.0.1",
"notistack": "^1.0.10",
"npm": "^7.11.2",
"pdfjs-dist": "^1.8.357",
"preval.macro": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-activity": "^1.2.2",
"react-bootstrap": "^1.3.0",
"react-chartjs-2": "^2.11.1",
"react-data-grid": "^6.1.0",
"react-detect-offline": "^2.4.0",
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.4",
"react-helmet": "^6.1.0",
"react-motion": "^0.5.2",
"react-perfect-scrollbar": "^1.5.8",
"react-redux": "^7.2.5",
"react-resize-detector": "^5.0.7",
"react-router": "^6.0.0-beta.4",
"react-router-dom": "^6.0.0-beta.4",
"react-scripts": "^3.4.0",
"react-slick": "^0.27.3",
"react-spring": "^8.0.27",
"react-transition-group": "^4.4.1",
"react-visibility-sensor": "^5.1.1",
"rebass": "^4.0.7",
"recompose": "^0.30.0",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"sass": "^1.41.1",
"simplebar-react": "^2.3.5",
"slick-carousel": "^1.8.1",
"styled-components": "^5.1.1",
"styled-system": "^5.1.5",
"three": "^0.85.2",
"typescript": "^3.9.7",
"uuid": "^8.3.1",
"xlsx": "^0.10.1",
"yup": "^0.32.1"
},
"scripts": {
"start": "set PORT=6545&& react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -b master -d build"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"#typescript-eslint/eslint-plugin": "^4.1.1",
"#typescript-eslint/parser": "^4.1.1",
"axios": "^0.19.2",
"babel-eslint": "^10.1.0",
"clean-tag": "^3.1.1",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.2",
"gh-pages": "^2.0.1",
"prettier": "^2.1.1",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-scripts": "^3.4.3",
"rebass": "^4.0.7",
"styled-system": "^5.1.5"
}
}
Recently I update electron version from 9 to 10 and after updated getting this error on debug mode only
when I downgrade to 9 it's working correctly
Deleted Node_Module and package.lock file multiple times and reinstall all package but no luck
I tried to upgrade to 11 electrons also but facing the same issue
When I am running in production mode "Yarn Start" is working fine
The issue in dev mode only "Yarn dev"
ERROR:-
App threw an error during load Error: ENOENT: no such file or directory, open 'electron'
at Object.openSync (fs.js:462:3)
at Object.func [as openSync] (electron/js2c/asar.js:140:31)
at Object.readFileSync (fs.js:364:35)
at Object.fs.readFileSync (electron/js2c/asar.js:542:40)
at Module._extensions..js (internal/modules/cjs/loader.js:1165:22)
at Object.newLoader [as .js] (C:\SVN\mangocrossplatform\trunk\node_modules\pirates\lib\index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:981:32)
at Module._load (internal/modules/cjs/loader.js:881:14)
at Function.Module._load (electron/js2c/asar.js:779:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
My Package.json File
{
"name": "mangoapps-messenger",
"productName": "Apps Messenger",
"version": "15.0.11",
"description": "Apps Messenger - An Universal Messenger For Apps",
"homepage": "",
"author": {
"email": "",
"name": ""
},
"scripts": {
"build": "yarn clean && concurrently \"yarn build-main\" \"yarn build-renderer\"",
"build-dll": "cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors",
"build-main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors",
"build-renderer": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors",
"dev": "yarn clean && cross-env START_HOT=1 node -r #babel/register ./internals/scripts/CheckPortInUse.js && cross-env START_HOT=1 yarn start-renderer-dev",
"package": "yarn build && electron-builder build --publish never",
"package-linux": "yarn build && electron-builder build --linux",
"package-mac": "yarn build && CSC_LINK=./certs/mac.p12 && CSC_IDENTITY_AUTO_DISCOVER=false && electron-builder build --mac",
"package-win": "yarn build && electron-builder build --win --x64",
"package-win32": "yarn build && electron-builder build --win --ia32",
"postinstall": "electron-builder install-app-deps && yarn build-dll && opencollective-postinstall",
"preinstall": "node ./internals/scripts/CheckYarn.js",
"prestart": "yarn build",
"start": "cross-env NODE_ENV=production electron ./dist/main.prod.js",
"start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r #babel/register ./app/main.dev.js",
"start-renderer-dev": "cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js",
"clean": "rimraf dist/"
},
"main": "./dist/main.prod.js",
"build": {
"productName": "Apps Messenger",
"appId": "com.mangoapps.electrondesktop",
"artifactName": "${name}-${version}.${ext}",
"generateUpdatesFilesForAllChannels": true,
"mac": {
"category": "productivity",
"type": "distribution",
"provisioningProfile": "certs/mac.provisionprofile",
"identity": "sdasdB",
"hardenedRuntime": true,
"entitlements": "build/entitlements.mac.inherit.plist",
"entitlementsInherit": "build/entitlements.mac.inherit.plist",
"gatekeeperAssess": false,
"extendInfo": {
"NSAppTransportSecurity": {
"NSAllowsArbitraryLoads": true,
"NSMicrophoneUsageDescription": "This lets you share using audio using the microphone.",
"NSCameraUsageDescription": "This lets you share a photo or video taken from your camera.",
"NSContactsUsageDescription": "This lets you enable access to your contacts and uses them to invite."
}
},
"target": [
"zip"
]
},
"linux": {
"target": [
"deb"
],
"category": "Productivity"
},
"win": {
"target": [
"nsis",
"msi"
],
"certificateFile": "",
"certificatePassword": "",
"publisherName": "",
"requestedExecutionLevel": "asInvoker",
"signAndEditExecutable": true,
"signDlls": true
},
"nsis": {
"oneClick": true,
"perMachine": false,
"deleteAppDataOnUninstall": true
},
"msi": {
"oneClick": true,
"perMachine": true
},
"files": [
"resources",
"dist/",
"dist/main.prod.js",
"dist/main.prod.js.map",
"package.json"
],
"directories": {
"buildResources": "resources",
"output": "release"
}
},
"keywords": [
"mangoapps",
"messenger"
],
"devDependencies": {
"#babel/core": "^7.4.0",
"#babel/plugin-proposal-class-properties": "^7.4.0",
"#babel/plugin-proposal-decorators": "^7.4.0",
"#babel/plugin-proposal-do-expressions": "^7.2.0",
"#babel/plugin-proposal-export-default-from": "^7.2.0",
"#babel/plugin-proposal-export-namespace-from": "^7.2.0",
"#babel/plugin-proposal-function-bind": "^7.2.0",
"#babel/plugin-proposal-function-sent": "^7.2.0",
"#babel/plugin-proposal-json-strings": "^7.2.0",
"#babel/plugin-proposal-logical-assignment-operators": "^7.2.0",
"#babel/plugin-proposal-nullish-coalescing-operator": "^7.2.0",
"#babel/plugin-proposal-numeric-separator": "^7.2.0",
"#babel/plugin-proposal-optional-chaining": "^7.2.0",
"#babel/plugin-proposal-pipeline-operator": "^7.3.2",
"#babel/plugin-proposal-throw-expressions": "^7.2.0",
"#babel/plugin-syntax-dynamic-import": "^7.2.0",
"#babel/plugin-syntax-import-meta": "^7.2.0",
"#babel/plugin-transform-react-constant-elements": "^7.2.0",
"#babel/plugin-transform-react-inline-elements": "^7.2.0",
"#babel/preset-env": "^7.4.2",
"#babel/preset-flow": "^7.0.0",
"#babel/preset-react": "^7.0.0",
"#babel/register": "^7.4.0",
"#fortawesome/fontawesome-pro": "^5.12.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^24.5.0",
"babel-loader": "^8.0.5",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"babel-register": "^6.26.0",
"chalk": "^2.4.2",
"concurrently": "^4.1.0",
"cross-env": "^5.2.0",
"cross-spawn": "^6.0.5",
"css-loader": "2.1.1",
"detect-port": "^1.3.0",
"electron": "^10.0.0",
"electron-builder": "^22.9.1",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.11.2",
"enzyme-to-json": "^3.3.5",
"fbjs-scripts": "^1.2.0",
"file-loader": "^4.2.0",
"html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.5.0",
"mini-css-extract-plugin": "^0.8.0",
"node-sass": "^4.13.0",
"opencollective-postinstall": "^2.0.2",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"prettier": "^1.16.4",
"react-svg-loader": "^3.0.3",
"react-test-renderer": "^16.8.6",
"redux-logger": "^3.0.6",
"rimraf": "^3.0.0",
"sass-loader": "^7.1.0",
"sinon": "^7.3.1",
"spectron": "^5.0.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.2.3",
"testcafe": "^1.1.0",
"testcafe-browser-provider-electron": "^0.0.8",
"testcafe-live": "^0.1.4",
"testcafe-react-selectors": "^3.1.0",
"url-loader": "^1.1.2",
"webpack": "^4.29.6",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1",
"webpack-merge": "^4.2.1",
"yarn": "^1.16.0"
},
"dependencies": {
"#babel/polyfill": "^7.7.0",
"#fortawesome/fontawesome-svg-core": "^1.2.26",
"#fortawesome/free-solid-svg-icons": "^5.12.0",
"#fortawesome/pro-duotone-svg-icons": "^5.12.0",
"#fortawesome/pro-light-svg-icons": "^5.12.0",
"#fortawesome/pro-regular-svg-icons": "^5.12.0",
"#fortawesome/pro-solid-svg-icons": "^5.12.0",
"#fortawesome/react-fontawesome": "^0.1.8",
"#trodi/electron-splashscreen": "^0.3.4",
"app-root-path": "^2.2.1",
"axios": "^0.21.1",
"babel-runtime": "^6.26.0",
"bootstrap": "^4.3.1",
"check-internet-connected": "^2.0.4",
"connected-react-router": "^6.3.2",
"copy-webpack-plugin": "^5.1.1",
"core-js": "2",
"custom-electron-titlebar": "^3.2.2-hotfix62",
"devtron": "^1.4.0",
"dotenv": "^8.2.0",
"electron-debug": "^2.1.0",
"electron-dl": "^3.0.2",
"electron-fetch": "^1.3.0",
"electron-localshortcut": "^3.1.0",
"electron-log": "^4.1.1",
"electron-positioner": "^4.1.0",
"electron-splashscreen": "^0.1.7",
"electron-store": "^3.2.0",
"electron-unhandled": "^3.0.2",
"electron-util": "^0.14.1",
"electron-window-state": "^5.0.3",
"emoji-mart": "^2.11.1",
"form-data": "^2.3.3",
"fs-extra": "^8.1.0",
"jquery": "^3.3.1",
"js-md5": "^0.7.3",
"lodash": "^4.17.15",
"mime-types": "^2.1.27",
"moment-timezone": "^0.5.27",
"node-mac-notifier": "file:local_dep/node-mac-notifier",
"node-machine-id": "^1.1.12",
"node-notifier": "^8.0.0",
"platform-folders": "^0.4.1",
"plist": "^3.0.1",
"popper.js": "^1.15.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hot-loader": "^4.12.15",
"react-image-crop": "^8.4.0",
"react-lazyload": "^2.6.2",
"react-page-layout": "^0.9.8",
"react-phone-input-2": "^2.13.9",
"react-player": "^1.15.2",
"react-redux": "^7.2.0",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"react-select": "^3.0.3",
"react-tenor": "^2.1.1",
"react-toastify": "^6.0.8",
"reactstrap": "^8.5.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"source-map-support": "^0.5.11",
"styled-components": "^5.0.0",
"universal-analytics": "^0.4.23",
"xml2js": "^0.4.19",
"zip-folder": "^1.0.0"
},
"devEngines": {
"node": ">=12.13.0",
"npm": ">=6.12.0",
"yarn": ">=1.19.0"
},
"browserslist": [
"defaults"
]
}
I used git push heroku command to push my node app to heroku but it shows following errors.
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: parse error: Expected another key-value pair at line 17,
column 3
remote: ! Unable to parse package.json
remote:
remote:
remote: -----> Build failed
remote: parse error: Expected another key-value pair at line 17,
column 3
remote: parse error: Expected another key-value pair at line 17,
column 3
remote:
remote: We're sorry this build is failing! You can troubleshoot
common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-
node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to guarded-ravine-41633.
remote:
To https://git.heroku.com/guarded-ravine-41633.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/guarded-
ravine-41633.git'
I don't know what i am doing wrong. If anyone could correct me than that would be very appreciated.
This is my package.json file.
{
"name": "project",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Nikhil <nikhilgupta6532#gmail.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"start": "node build/dev-server.js",
"build": "node build/build.js",
"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/specs
test/e2e/specs",
"start":"node server.js",
},
"engines": {
"node": ">= 8.2.1",
"npm": ">= 5.3.0"
},
"dependencies": {
"vue": "^2.3.3",
"vue-router": "^2.6.0"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"cssnano": "^3.10.0",
"eslint": "^3.19.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^3.0.0",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"webpack-bundle-analyzer": "^2.2.1",
"cross-env": "^5.0.1",
"karma": "^1.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": "^1.3.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.2",
"lolex": "^1.5.2",
"mocha": "^3.2.0",
"chai": "^3.5.0",
"sinon": "^2.1.0",
"sinon-chai": "^2.8.0",
"inject-loader": "^3.0.0",
"babel-plugin-istanbul": "^4.1.1",
"phantomjs-prebuilt": "^2.1.14",
"chromedriver": "^2.27.2",
"cross-spawn": "^5.0.1",
"nightwatch": "^0.9.12",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"opn": "^5.1.0",
"optimize-css-assets-webpack-plugin": "^2.0.0",
"ora": "^1.2.0",
"rimraf": "^2.6.0",
"url-loader": "^0.5.8",
"vue-loader": "^12.1.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.3.3",
"webpack": "^2.6.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.18.0",
"webpack-merge": "^4.1.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
I am currently using Vue.js inside my project along with Node.js and sockets.io with database as Mongodb.
Reading though the error you provided, it mentions that it during your build process, it expected another key-value pair on line 17 of package.json.
I ran your package.json through a JSON and found a few issues, as follows -
Parse error on line 11: You should remove the line break between lines 11 and 12.
"unit": "cross-env BABEL_ENV=test karma start test / unit / karma.conf.js--single - run ",
Parse error on line 14:: You should remove the line break between lines 14 and 15.
"lint": "eslint --ext .js,.vue src test/unit/specstest / e2e / specs ",
Parse error on line 15:: You should remove the comma, since this is the last property of scripts.
"start": "node server.js"
Duplicate key 'start' on line 15:: *You need to decide whether you want your start script to be
"start": "node build/dev-server.js", OR "start": "node build/dev-server.js",
Fixing these should solve your build errors.
Corrected package.js file
{
"name": "project",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Nikhil <nikhilgupta6532#gmail.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"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/specs test / e2e / specs ",
"start": "node server.js"
},
"engines": {
"node": ">= 8.2.1",
"npm": ">= 5.3.0"
},
"dependencies": {
"vue": "^2.3.3",
"vue-router": "^2.6.0"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"cssnano": "^3.10.0",
"eslint": "^3.19.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^3.0.0",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"webpack-bundle-analyzer": "^2.2.1",
"cross-env": "^5.0.1",
"karma": "^1.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": "^1.3.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.2",
"lolex": "^1.5.2",
"mocha": "^3.2.0",
"chai": "^3.5.0",
"sinon": "^2.1.0",
"sinon-chai": "^2.8.0",
"inject-loader": "^3.0.0",
"babel-plugin-istanbul": "^4.1.1",
"phantomjs-prebuilt": "^2.1.14",
"chromedriver": "^2.27.2",
"cross-spawn": "^5.0.1",
"nightwatch": "^0.9.12",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"opn": "^5.1.0",
"optimize-css-assets-webpack-plugin": "^2.0.0",
"ora": "^1.2.0",
"rimraf": "^2.6.0",
"url-loader": "^0.5.8",
"vue-loader": "^12.1.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.3.3",
"webpack": "^2.6.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.18.0",
"webpack-merge": "^4.1.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Check this out you have error . Json error syntax
errors
"unit": all test in same line
same for "lint"
and remove two start and also removed comma in line 17
new file
{
"name": "project",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Nikhil <nikhilgupta6532#gmail.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"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/specs test/e2e/specs",
"start":"node server.js"
},
"engines": {
"node": ">= 8.2.1",
"npm": ">= 5.3.0"
},
"dependencies": {
"vue": "^2.3.3",
"vue-router": "^2.6.0"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"cssnano": "^3.10.0",
"eslint": "^3.19.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^3.0.0",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"webpack-bundle-analyzer": "^2.2.1",
"cross-env": "^5.0.1",
"karma": "^1.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": "^1.3.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.2",
"lolex": "^1.5.2",
"mocha": "^3.2.0",
"chai": "^3.5.0",
"sinon": "^2.1.0",
"sinon-chai": "^2.8.0",
"inject-loader": "^3.0.0",
"babel-plugin-istanbul": "^4.1.1",
"phantomjs-prebuilt": "^2.1.14",
"chromedriver": "^2.27.2",
"cross-spawn": "^5.0.1",
"nightwatch": "^0.9.12",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"opn": "^5.1.0",
"optimize-css-assets-webpack-plugin": "^2.0.0",
"ora": "^1.2.0",
"rimraf": "^2.6.0",
"url-loader": "^0.5.8",
"vue-loader": "^12.1.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.3.3",
"webpack": "^2.6.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.18.0",
"webpack-merge": "^4.1.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
This started today after saving the react-addons-css-transition-group npm package as a dependency.
I then went down a rabbit hole of updating, adding & removing various dependencies as well as making sure all the react-related dependencies share the same versioning. I think I'm back to where I was before adding the react-addons-css-transition-group dependency, aside from updates, but I'm still getting this error and I can't find anything online relating to it specifically.
package.json if that helps:
{
"name": "",
"version": "0.1.0",
"author": "",
"description": "",
"license": "MIT",
"repository": {
"type": "git",
"url": ""
},
"main": "server.js",
"scripts": {
"lint": "eslint --ext .js,.jsx --ignore-pattern public",
"start": "brunch watch --server",
"knex": "knex",
"heroku-postbuild": "brunch build --production; knex migrate:latest",
"nf": "nf start"
},
"dependencies": {
"auto-reload-brunch": "^2.7.1",
"axios": "^0.14.0",
"babel-brunch": "^6.0.5",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"bcrypt": "^0.8.7",
"bcrypt-as-promised": "^1.1.0",
"body-parser": "^1.15.2",
"boom": "^4.0.0",
"brunch": "^2.9.1",
"clean-css-brunch": "^2.0.0",
"cookie-parser": "^1.4.3",
"dotenv": "^2.0.0",
"express": "^4.14.0",
"express-validation": "^1.0.1",
"humps": "^1.1.0",
"javascript-brunch": "^2.0.0",
"joi": "^9.0.4",
"jsonwebtoken": "^7.1.9",
"knex": "^0.12.0",
"material-ui": "^0.16.3",
"morgan": "^1.7.0",
"multer": "1.1.0",
"pg": "^6.1.0",
"react": "^15.4.1",
"react-cookie": "^0.4.8",
"react-dom": "^15.4.1",
"react-router": "^2.8.0",
"react-tap-event-plugin": "^2.0.0",
"sass-brunch": "^2.7.0",
"weak-key": "^1.0.0",
"xml2js": "^0.4.17"
},
"devDependencies": {
"eslint": "^3.2.2",
"eslint-config-ryansobol": "^8.0.0",
"foreman": "^2.0.0"
},
"engines": {
"node": "7.2.0"
}
}
I was able to resolve this issue by deleting the node-modules folder and re-importing all dependencies.
My dependencies and devDependencies sections look like that after the re-import:
"dependencies": {
"lodash": "^4.17.2",
"material-ui": "^0.16.5",
"react": "^15.4.1",
"react-addons-perf": "^15.4.1",
"react-addons-test-utils": "^15.4.1",
"react-dom": "^15.4.1",
"react-tap-event-plugin": "^2.0.1"
},
"devDependencies": {
"auto-reload-brunch": "^2.0.0",
"babel-brunch": "~6.0.0",
"babel-preset-es2015": "~6.9.0",
"babel-preset-react": "~6.11.1",
"brunch": "^2.4.0",
"clean-css-brunch": "^2.0.0",
"css-brunch": "^2.0.0",
"javascript-brunch": "^2.0.0",
"uglify-js-brunch": "^2.0.0"
}
This is caused by a Brunch bug.
We added a workaround in React 15.4.2 but can’t guarantee it won’t break again.