Ember js Build Error (broccoli-persistent-filter:EslintValidationFilter) - node.js

After cloning the repository from Github then install npm and try to execute ember s. but I got this error. Then I delete node modules directory and package-lock.json file and install npm again. But i can't solve it.I am googling this error but can't solve it. Plz, Help me.
Here is my Error:
Build Error (broccoli-persistent-filter:EslintValidationFilter) in helpers/flash-
message.js
Package subpath './lib/util/traverser' is not defined by "exports" in
/home/ag/Office/ecommerce/front-end/node_modules/eslint/package.json
Stack Trace and Error Report: /tmp/error.dump.a671c24c39f689554c47c73d068f7e9f.log
My Package.json:
{
"name": "front-end",
"version": "0.0.0",
"private": true,
"description": "Small description for front-end goes here",
"repository": "",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test"
},
"devDependencies": {
"#ember/jquery": "^0.6.0",
"#ember/optional-features": "^0.7.0",
"broccoli-asset-rev": "^3.0.0",
"ember-ajax": "^5.0.0",
"ember-aria-tabs": "^3.0.0",
"ember-auto-import": "^1.10.1",
"ember-cli": "~3.12.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.7.3",
"ember-cli-bootstrap-4": "^0.12.0",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-flash": "^2.1.0",
"ember-cli-form-data": "^2.1.1",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-moment-shim": "^3.8.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-swiper": "^1.0.6",
"ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^2.1.0",
"ember-composable-helpers": "^2.4.0",
"ember-concurrency": "^1.3.0",
"ember-cp-validations": "^4.0.0-beta.12",
"ember-crumbly": "^3.0.1",
"ember-data": "~3.12.0",
"ember-drag-drop": "^0.9.0-beta.0",
"ember-export-application-global": "^2.0.0",
"ember-fetch": "^8.1.0",
"ember-font-awesome": "^4.0.0-rc.4",
"ember-load-initializers": "^2.0.0",
"ember-local-storage": "^1.7.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-modal-dialog": "^3.0.1",
"ember-moment": "^8.0.1",
"ember-pickr": "^2.2.1",
"ember-power-select": "^3.0.2",
"ember-qunit": "^4.4.1",
"ember-resize": "^0.3.4",
"ember-resolver": "^5.0.1",
"ember-source": "~3.12.0",
"ember-toggle": "^7.1.0",
"ember-tooltips": "^3.4.5",
"ember-uuid": "^2.1.0",
"ember-welcome-page": "^4.0.0",
"eslint-plugin-ember": "^6.2.0",
"eslint-plugin-node": "^9.0.1",
"loader.js": "^4.7.0",
"popper.js": "^1.16.1",
"qunit-dom": "^0.8.4",
"sass": "^1.30.0"
},
"engines": {
"node": "8.* || >= 10.*"
},
"dependencies": {
"drift-zoom": "^1.5.0"
}
}
If anyone has any idea about this error then comment or answer it. I will vote and accept the answer.

Finally, I fix my issue by downgrading the node version from 17 to 16.

Related

Override for react-error-overlay#^6.0.9 conflicts with direct dependency

I have changed my node version and keep getting this error if I try to install another package or just try to run npm install. Here is the error message:
npm ERR! code EOVERRIDE
npm ERR! Override for react-error-overlay#^6.0.9 conflicts with direct dependency
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Local\npm-cache_logs\2022-12-08T16_39_09_063Z-debug-0.log`
My package.json file is below:
{
"name": "kamamini",
"version": "0.1.0",
"author": "Moctar Yonli",
"private": true,
"dependencies": {
"#ckeditor/ckeditor5-build-classic": "^28.0.0",
"#ckeditor/ckeditor5-build-decoupled-document": "^28.0.0",
"#ckeditor/ckeditor5-react": "^3.0.2",
"#emotion/react": "^11.5.0",
"#emotion/styled": "^11.3.0",
"#firebase/auth-interop-types": "^0.1.5",
"#glidejs/glide": "^3.5.2",
"#material-ui/core": "^4.11.3",
"#material-ui/icons": "^4.11.2",
"#metismenu/react": "0.0.2",
"#mui/icons-material": "^5.0.5",
"#mui/material": "^5.0.6",
"#mui/styles": "^5.0.2",
"#testing-library/jest-dom": "^5.11.9",
"#testing-library/react": "^11.2.5",
"#testing-library/user-event": "^12.7.1",
"axios": "^0.24.0",
"bootstrap": "^5.1.3",
"dotenv": "^10.0.0",
"firebase": "^8.4.1",
"formik": "^2.2.9",
"framer-motion": "^4.1.17",
"gh-pages": "^3.2.3",
"history": "^5.0.1",
"moment": "^2.29.4",
"node-sass": "^7.0.1",
"perfect-scrollbar": "^1.5.2",
"react": "^17.0.1",
"react-confetti": "^6.1.0",
"react-currency-format": "^1.1.0",
"react-dom": "^17.0.1",
"react-dropzone": "^11.3.2",
"react-helmet-async": "^1.3.0",
"react-html-parser": "^2.0.2",
"react-image-gallery": "^1.0.9",
"react-material-ui-carousel": "^2.2.6",
"react-payment-inputs": "^1.1.9",
"react-player": "^2.9.0",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-share": "^4.4.0",
"react-slick": "^0.28.1",
"react-swipeable-views": "^0.14.0",
"react-toastify": "^7.0.3",
"react-use": "^17.4.0",
"reactstrap": "^8.9.0",
"redux": "^4.1.0",
"redux-thunk": "^2.3.0",
"slick-carousel": "^1.8.1",
"styled-components": "^5.3.3",
"web-vitals": "^1.1.0",
"yup": "^0.32.9"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"``eslintConfig``": {
"extends": [
"react-app",
"react-app/jest"
]
},
"`browserslist`": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"overrides": {
"react-error-overlay": "6.0.9"
},
"devDependencies": {
"react-error-overlay": "^6.0.9"
}
}
Why do I get this error when trying to install a package?
As per the docs
You may not set an override for a package that you directly depend on unless both the dependency and the override itself share the exact same spec.
Your override for react-error-overlay specifies 6.0.9 (i.e. the exact version), while your devDependencies specifies ~6.0.9 (i.e. match 6.0.9 or any patch release above). These specs are not exactly the same, so you get the error.
You can fix it by:
updating your overrides to use ~6.0.9
updating your devDependencies to use 6.0.9
updating your overrides to use "react-error-overlay": "$react-error-overlay" which tells it to use the version referenced in the dependencies directly
To make this limitation easier to deal with, overrides may also be defined as a reference to a spec for a direct dependency by prefixing the name of the package you wish the version to match with a $.
You just have to remove the overrides section of your package.json file.

Error in start react with vite (parse5 error code eof-in-element-that-can-contain-only-text)

When I start the application I get the following error:
[vite] Internal server error: Unable to parse HTML; parse5 error code
eof-in-element-that-can-contain-only-text at
{"file":"/index.html","line":56,"column":1}
at {"file":"/index.html","line":56,"column":1}
at handleParseError (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-a713b95d.js:43358:11)
at Parser.onParseError (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-a713b95d.js:43285:13)
at Parser._err (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:4942:14)
at eofInText (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:6977:7)
at Parser.onEof (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:5731:17)
at Tokenizer._emitEOFToken (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:1403:22)
at Tokenizer._stateRawtext (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:1903:22)
at Tokenizer._callState (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:1522:22)
at Tokenizer._runParsingLoop (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:1179:22)
at Tokenizer.write (file:///C:/Users/Marco/Documents/Projetos/admooh-presentation/src/node_modules/vite/dist/node/chunks/dep-19c40c50.js:1204:14)
package.json
{
"name": "admooh-presentation",
"version": "4.1.0",
"description": "Admooh presentation project",
"repository": {
"type": "git",
"url": "git://github.com/react-boilerplate/react-boilerplate-typescript.git"
},
"license": "MIT",
"author": "Max Stoiber",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 8080",
"lint": "npm run typecheck && npm run lint:css && npm run lint:eslint:quiet app",
"lint:css": "stylelint app/**/*.{js,ts,tsx}",
"lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx --no-error-on-unmatched-pattern",
"lint:eslint:fix": "eslint --ext .ts,.tsx,.js,.jsx --no-error-on-unmatched-pattern --quiet --fix",
"lint:eslint:quiet": "eslint --ext .ts,.tsx,.js,.jsx --no-error-on-unmatched-pattern --quiet",
"prettify": "prettier --write app ",
"pretest": "npm run test:clean && npm run lint",
"test": "vitest run",
"test:ci": "vitest run",
"test:clean": "rimraf ./coverage",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch",
"typecheck": "tsc --noEmit",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"prepare": "cd .. && husky install"
},
"lint-staged": {
"*.{md,json}": [
"prettier --write",
"git add --force"
],
"*.{ts,tsx,js,jsx}": [
"npm run lint:eslint:fix",
"git add --force"
]
},
"dependencies": {
"#devexpress/dx-core": "3.0.5",
"#devexpress/dx-react-chart": "3.0.5",
"#devexpress/dx-react-chart-material-ui": "3.0.5",
"#devexpress/dx-react-core": "3.0.5",
"#hookform/resolvers": "2.9.8",
"#mui/icons-material": "^5.10.3",
"#mui/lab": "5.0.0-alpha.99",
"#mui/material": "^5.10.5",
"#mui/styled-engine-sc": "^5.10.3",
"#mui/x-date-pickers": "^5.0.1",
"#react-google-maps/api": "2.12.2",
"#rjsf/bootstrap-4": "^4.2.3",
"#rjsf/core": "^4.2.3",
"#textea/json-viewer": "^1.24.4",
"#uppy/core": "3.0.1",
"#uppy/dashboard": "^3.0.1",
"#uppy/drag-drop": "^3.0.0",
"#uppy/file-input": "^3.0.0",
"#uppy/locales": "3.0.0",
"#uppy/progress-bar": "^3.0.0",
"#uppy/react": "3.0.1",
"#uppy/tus": "3.0.1",
"#uppy/xhr-upload": "^3.0.1",
"bootstrap": "^4.6.2",
"copy-to-clipboard": "^3.3.2",
"crypto-js": "^4.1.1",
"currency.js": "2.0.4",
"date-fns": "2.29.3",
"immer": "9.0.15",
"intl": "1.2.5",
"jsdom": "^20.0.0",
"lodash": "4.17.21",
"mixpanel-browser": "^2.45.0",
"mui-tel-input": "^2.0.1",
"node-fetch": "^3.2.10",
"notistack": "3.0.0-alpha.7",
"ramda": "0.28.0",
"react": "18.2.0",
"react-beautiful-dnd": "13.1.1",
"react-bootstrap": "^1.6.6",
"react-dom": "18.2.0",
"react-error-boundary": "3.1.4",
"react-hook-form": "7.35.0",
"react-input-mask": "^2.0.4",
"react-intl": "6.1.1",
"react-jsonschema-form": "1.8.1",
"react-query": "3.39.2",
"react-responsive": "9.0.0-beta.10",
"react-responsive-carousel": "3.2.23",
"react-router-dom": "^6.4.0",
"react-table": "7.8.0",
"react-youtube": "10.0.0",
"sanitize.css": "13.0.0",
"styled-components": "5.3.5",
"typescript-plugin-styled-components": "2.0.0",
"use-immer": "0.7.0",
"use-places-autocomplete": "4.0.0",
"vest": "3.2.8",
"yup": "0.32.11",
"zod": "^3.19.1"
},
"devDependencies": {
"#hookform/devtools": "4.2.2",
"#storybook/addon-actions": "^6.5.12",
"#storybook/addon-essentials": "^6.5.12",
"#storybook/addon-links": "^6.5.12",
"#storybook/react": "^6.5.12",
"#stylelint/postcss-css-in-js": "^0.38.0",
"#testing-library/jest-dom": "5.16.5",
"#testing-library/react": "13.4.0",
"#testing-library/user-event": "14.4.3",
"#types/google.maps": "^3.50.1",
"#types/lodash": "4.14.185",
"#types/node": "18.7.18",
"#types/ramda": "0.28.15",
"#types/react": "18.0.20",
"#types/react-beautiful-dnd": "13.1.2",
"#types/react-dom": "18.0.6",
"#types/react-responsive": "8.0.5",
"#types/react-router-dom": "5.3.3",
"#types/styled-components": "5.1.26",
"#types/testing-library__jest-dom": "5.14.5",
"#typescript-eslint/eslint-plugin": "5.37.0",
"#typescript-eslint/parser": "5.37.0",
"#vitejs/plugin-react": "2.1.0",
"#vitest/ui": "^0.23.2",
"cross-env": "7.0.3",
"eslint": "8.23.1",
"eslint-config-airbnb-typescript": "17.0.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-typescript": "3.5.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jest-dom": "^4.0.2",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.31.8",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-storybook": "^0.6.4",
"eslint-plugin-testing-library": "^5.6.4",
"husky": "^8.0.1",
"lint-staged": "13.0.3",
"msw": "0.47.3",
"postcss-syntax": "^0.36.2",
"prettier": "2.7.1",
"rimraf": "3.0.2",
"stylelint": "14.11.0",
"stylelint-config-recommended": "9.0.0",
"stylelint-config-styled-components": "0.1.1",
"stylelint-processor-styled-components": "1.10.0",
"typescript": "4.8.3",
"vite": "^3.1.1",
"vitest": "^0.23.2"
},
"engines": {
"node": ">=10.13.0",
"npm": ">=6.4.1"
},
"msw": {
"workerDirectory": "public"
}
}
Can anyone tell me what the error could be?
Already adjusted the dependencies, already deleted the nodemodules and installed again.
Node version: 16.17
You should probably include the HTML file in the question too.
In my case I found the issue was invalid HTML not quite on the same line. I had a self closing script tag that looked like:
<script type="text/javascript" src="/src/index.js"/>
which is invalid HTML. Changing it to <script type="text/javascript" src="/src/index.js"></script> fixed it. See Why don't self-closing script elements work?
I've just found out what the problem was. Sine version 3.1.0 vite uses parse5 as it's html parser. And for some reason this causes the crash. You should lock the vite dependency on 3.0.9.
Edit:
So, I have finally figured out what the problem was with my html file, since there was a need to update to the latest vite version.
It was because of html file formatting, parse5 throws when you have html styled like so
<noscript
><div>
<h1 style="margin: 16px; font-size: 26px">
No js detected
</h1>
<p style="font-size: 18px">
Turn your js on
</p>
</div></noscript
>
Notice the new line after <noscript that is the problem. It has to be <noscript> without the empty line. Obviously, the same applies to other tags. Which is really stupid, since that is completely valid and some formatters do format html like that.

NodeJS .env variables (using dotenv) are not submitting to change -- cached?

I am working on a KeystoneJS project, currently running in development mode on NodeJS 12.14.0. About a week or ten days ago I noticed that even though I changed some environment variables in .env the changes were not reflected at run-time. I've had to actually introduce new variables for the changes to take effect.
I've done searches (using WebStorm and VSC) in my code for the old information, but it only appears in my debug logs. That is to say, if the old value of my env var ANIMAL was 'rooster' and I've changed it to 'lizard', 'rooster' does not appear anywhere in my code. And yet ANIMAL keeps having the value rooster at runtime. So that I have to introduce a new variable, NEW_ANIMAL=lizard to make any changes work.
This does not happen with all env variables -- for instance, I just added a new one, TEST=1, ran the app, stopped, changed it to TEST=2, and the change worked fine. I do not see a pattern in what variables are affected.
I'm launching the project through Keystone's launch script, and I'm using TypeScript. My launch script is
"dev": "tsc && cross-env NODE_ENV=development DISABLE_LOGGING=true keystone --entry=tsout/index.js dev --port=4545"
dotenvis being loaded at the top of the entry point to the project, /index.ts,
require('dotenv').config();
which is run each time the project is restarted (for the record, I'm using Babel to be able to use import instead of require throughout the project, but I can't imagine that matters).
I just spent half an hour with another dev here going over this and neither of us could figure it out (actually we were trying to track down a weird bug and it turned out it was because even though the .env variable had been changed, the app was still reading the old value).
If anyone has ever encountered anything like this before -- or has any clues on how to figure it out -- I'd be very grateful.
I include my package.json below. I'm running MacOS 10.14.x and NodeJS 12.14.0, for what it's worth.
{
"name": "#keystonejs/example-projects-blank",
"description": "A blank KeystoneJS starter project.",
"private": true,
"version": "5.0.0",
"author": "The KeystoneJS Development Team",
"repository": "https://github.com/keystonejs/keystone.git",
"homepage": "https://github.com/keystonejs/keystone",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
},
"scripts": {
"dev": "tsc && cross-env NODE_ENV=development DISABLE_LOGGING=true keystone --entry=tsout/index.js dev --port=4545",
"build": "cross-env NODE_ENV=production keystone build",
"start": "cross-env NODE_ENV=production keystone start",
"keystone": "keystone upgrade-relationships --index=tsout/index.js"
},
"dependencies": {
"#apollo/react-hooks": "^3.1.5",
"#arch-ui/fields": "^3.0.1",
"#arch-ui/layout": "^0.2.13",
"#arch-ui/typography": "^0.0.17",
"#emotion/core": "^10.0.28",
"#emotion/styled": "^10.0.27",
"#keystonejs/adapter-mongoose": "^8.1.0",
"#keystonejs/app-admin-ui": "^6.0.0",
"#keystonejs/app-graphql": "^5.1.7",
"#keystonejs/app-next": "^5.1.2",
"#keystonejs/app-static": "^5.1.2",
"#keystonejs/auth-password": "^5.1.7",
"#keystonejs/field-content": "^6.0.0",
"#keystonejs/fields": "^10.0.0",
"#keystonejs/fields-markdown": "^5.1.10",
"#keystonejs/fields-wysiwyg-tinymce": "^5.2.7",
"#keystonejs/file-adapters": "^6.0.2",
"#keystonejs/keystone": "^9.0.0",
"#keystonejs/list-plugins": "^5.1.4",
"#keystonejs/oembed-adapters": "^5.1.4",
"#tinymce/tinymce-react": "^3.6.0",
"#zeit/next-sass": "^1.0.1",
"apollo-boost": "^0.4.8",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.9",
"apollo-fetch": "^0.7.0",
"apollo-link-http": "^1.5.17",
"apollo-upload-client": "^13.0.0",
"app-root-path": "^3.0.0",
"axios": "^0.19.2",
"connect-mongo": "^3.2.0",
"cron": "^1.8.2",
"cross-env": "^7.0.0",
"date-fns": "^1.30.1",
"disqus-react": "^1.0.7",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-fileupload": "^1.1.6",
"express-session": "^1.17.1",
"graphql": "^14.6.0",
"graphql-tag": "^2.10.3",
"isomorphic-unfetch": "^3.0.0",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"loglevel": "^1.6.7",
"moment": "^2.24.0",
"multer": "^1.4.2",
"next": "^9.3.6",
"next-with-apollo": "^5.0.1",
"node-cron": "^2.0.3",
"node-fetch": "^2.6.0",
"node-sass": "^4.14.1",
"normalize-scss": "^7.0.1",
"ramda": "^0.27.0",
"react": "^16.13.1",
"react-apollo": "^3.1.5",
"react-dom": "^16.13.1",
"reading-time": "^1.2.0",
"require-directory": "^2.1.1",
"sanitize-html": "^1.23.0",
"string-strip-html": "^4.4.3",
"ts-node": "^8.10.1",
"typescript": "^3.8.3",
"uuid": "^7.0.2",
"validator": "^13.0.0",
"winston": "^3.2.1"
},
"devDependencies": {
"#babel/plugin-proposal-optional-chaining": "^7.9.0",
"#types/express-fileupload": "^1.1.3",
"#types/node": "^13.13.5",
"#types/react": "^16.9.35",
"#types/winston": "^2.4.4",
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"cz-conventional-changelog": "3.2.0",
"eslint-plugin-react-hooks": "^4.0.0",
"pino": "^6.2.1",
"pino-pretty": "^4.0.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}

Problem with deploying to Google Cloud App Engine

I'm trying to deploy my app to Google Cloud, but I still receive error:
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
> biurovue#1.0.0 start /app
> node build/dev-server.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'chalk' .....
My app is built with nodejs, back end is in Express and Sequalizer and front end is in vuejs.
I'm calling
gcloud int
gcloud app deploy
and then, after few minutes error above occures.
I've tried several times:
npm install chalk
also, I've removed node_modules folder and call npm install from the scratch. Didn't help.
My package.json is following:
{
"name": "biurovue",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Shark <arek.shark#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"
},
"dependencies": {
"#okta/jwt-verifier": "0.0.11",
"axios": "^0.18.0",
"cors": "^2.8.4",
"each-async": "^1.1.1",
"easy-async": "^1.0.0",
"finale-rest": "^1.0.6",
"indent-string": "^4.0.0",
"sequelize": "^4.37.6",
"sqlite3": "^4.1.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuedraggable": "^2.23.0"
},
"devDependencies": {
"autoprefixer": "^7.1.5",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"babel-plugin-istanbul": "^4.1.5",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"chalk": "^2.4.2",
"chromedriver": "^2.33.1",
"connect-history-api-fallback": "^1.4.0",
"copy-webpack-plugin": "^4.1.1",
"cross-env": "^5.0.5",
"cross-spawn": "^5.1.0",
"css-loader": "^0.28.7",
"cssnano": "^3.10.0",
"eslint": "^4.9.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.2.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.16.3",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.5",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"http-proxy-middleware": "^0.17.4",
"inject-loader": "^3.0.1",
"karma": "^1.7.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-phantomjs-shim": "^1.5.0",
"karma-sinon-chai": "^1.3.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.5",
"mocha": "^4.0.1",
"nightwatch": "^0.9.16",
"opn": "^5.1.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.3.0",
"phantomjs-prebuilt": "^2.1.15",
"rimraf": "^2.6.2",
"selenium-server": "^3.6.0",
"semver": "^5.4.1",
"shelljs": "^0.7.8",
"sinon": "^4.0.1",
"sinon-chai": "^2.14.0",
"sw-precache-webpack-plugin": "^0.11.4",
"uglify-es": "^3.1.3",
"url-loader": "^0.6.2",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.3",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.7.1",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
What can be a problem? How to solve? diagnose errors like this?
Thanks.
Move them into dependencies. devDependencies should really only be used, as its name suggests, for development. Suppose you have a package which in turn has multiple dependencies. Suppose you are using mochaJS, chaiJS and sinonJS to achieve full test coverage. The end-user installing your package most likely wouldn't want to install the testing and/or documentation frameworks you used as well. Thus, those frameworks would be placed on devDependencies. In this case, because chalk and shellJS are required at runtime they would have to be placed in dependencies.
Summary: Use dependencies for packages required at runtime and devDependencies for packages required only to develop ( testing frameworks, linting, etc. )

Cant resolve fbjs/lib/memoizeStringOnly

Just did a refresh of my computer but now Im having trouble running my code....
When running "npm start" I get the following error:
> ERROR in ./~/react-dom/lib/CSSPropertyOperations.js Module not found:
> Error: Can't resolve 'fbjs/lib/memoi zeStringOnly' in
> 'C:\Code\Project.Web\node_modules\react-dom\lib'
> # ./~/react-dom/lib/CSSPropertyOperations.js 20:24-61
> # ./~/react-dom/lib/ReactDOMComponent.js #
> ./~/react-dom/lib/ReactDefaultInjection.js #
> ./~/react-dom/lib/ReactDOM.js # ./~/react-dom/index.js #
> ./source/components/index.js # multi
> (webpack)-dev-server/client?http://0.0.0.0:30 00
> webpack/hot/dev-server ./index.js
I tried to update all packages but got same error...
Here is my package.json file:
{
"name": "homecore.web",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack-dashboard -t 'HomeCore' -- webpack-dev-server --colors --no-info",
"build": "rm -rf ./build && NODE_ENV=\"production\" webpack",
"lint-break-on-errors": "eslint ./source/js ./webpack.config.js -f table --ext .js --ext .jsx",
"lint": "eslint ./source/js ./webpack.config.js -f table --ext .js --ext .jsx || true",
"preview": "NODE_ENV=\"production\" webpack-dashboard -t 'Preview Mode - React-Redux Boilerplate' -- webpack-dev-server",
"hook-add": "prepush install",
"hook-remove": "prepush remove"
},
"author": "",
"license": "ISC",
"devDependencies": {
"autoprefixer": "^6.7.7",
"babel-core": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.0.0",
"babel-plugin-syntax-decorators": "^6.13.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.23.0",
"css-loader": "0.28.1",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.11.1",
"html-webpack-plugin": "^2.28.0",
"less": "^2.7.2",
"less-loader": "^4.0.3",
"postcss-loader": "^1.3.3",
"prepush": "^3.1.11",
"style-loader": "^0.17.0",
"url-loader": "^0.5.8",
"webpack": "^2.4.1",
"webpack-dashboard": "^0.4.0",
"webpack-dev-server": "^2.4.5"
},
"dependencies": {
"alt": "0.18.6",
"alt-utils": "^1.0.0",
"babel-polyfill": "^6.23.0",
"es6-promise": "^4.1.0",
"immutable": "^3.8.1",
"isomorphic-fetch": "^2.2.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1",
"semantic-ui-react": "^0.68.2",
"whatwg-fetch": "^2.0.3"
},
"prepush": [
"npm run lint-break-on-errors --silent"
]
}
Ok so after a lot of googleing, I found a work around. Im still not sure why i get this error.
But according to this post there is a way to add alias in webpack.
So i added this to my webpack.config.js
var alias = {};
alias['fbjs/lib/memoizeStringOnly'] = '../node_modules/fbjs/lib/memoizeStringOnly';
module.exports = {
.
.
alias : alias,
.
.
}
and now it works!
But, and now Im guessing, some package must be broken trying to access this component from the wrong location
Within the last week or so, I've run into the same issue but with react-dom#15.4.2 instead of react-dom#15.5.4. What I think I've found to be the issue is that Webpack isn't able to resolve the fbjs dependency within the react-dom/node_modules directory.
For me, I was able to solve the issue by including the fbjs package as an explicit dependency in the package.json. Now instead of the project-level dependency linking to the peer of react-dom, the module in react-dom links to the project-level module.
Now, I don't think this is necessarily the right solution, especially if you allow minor version bumps with '~' and '^' in your package.json, but because we are only updating our dependencies when we need to by hand, our team is comfortable specifying the version of fbjs.
Snippet of our package.json:
"dependencies": {
"assets-webpack-plugin": "3.5.1",
"babel-core": "6.24.0",
"babel-loader": "6.4.1",
"babel-preset-es2015": "6.24.0",
"babel-preset-react": "6.23.0",
"css-loader": "0.26.4",
"del": "2.2.2",
"es6-promise": "4.1.0",
"fbjs": "0.8.12",
"file-loader": "0.10.1",
"flux": "2.1.1",
"highcharts": "5.0.10",
"imports-loader": "0.7.1",
"jquery": "2.1.3",
"keymirror": "0.1.1",
"lodash": "3.10.1",
"lodash.clonedeep": "4.5.0",
"material-design-icons": "2.2.3",
"material-ui": "0.17.1",
"moment": "2.18.1",
"object-assign": "4.1.1",
"postcss-loader": "1.3.3",
"rc-progress": "2.1.0",
"react": "15.4.2",
"react-addons-perf": "15.4.2",
"react-data-grid": "1.0.85",
"react-dom": "15.4.2",
"react-highcharts": "11.5.0",
"react-router": "3.0.3",
"react-tap-event-plugin": "2.0.1",
"sass-loader": "6.0.3",
"style-loader": "0.13.2",
"superagent": "3.5.2",
"underscore": "1.8.3",
"url-loader": "0.5.8",
"webpack": "2.4.1"
},
I ran into this error as well after uninstalling a package. It seems fbjs was somehow removed as well, even though other packages still depended on it.
I fixed it by manually installing fbjs with npm install fbjs --save

Resources