I am getting an error while run command
npm run build
Creating an optimized production build...
Failed to compile.
Cannot set property 'value' of undefined
CompileError: Begins at CSS selector undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/macbook/.npm/_logs/2020-01-03T12_25_17_735Z-debug.log
S-MacBook-Air:account-opening-frontend macbook$
My package.json
{
"name": "account-opening",
"version": "0.1.0",
"author": {
"name": "Sourabh Parmar"
},
"private": true,
"dependencies": {
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.2",
"axios": "^0.18.1",
"browserslist": "^4.8.3",
"date-fns": "^1.30.1",
"detect-browser": "^4.5.0",
"material-ui-pickers": "^2.2.4",
"moment": "^2.24.0",
"react": "^16.8.2",
"react-cropper": "^1.2.0",
"react-datepicker": "^2.8.0",
"react-dom": "^16.8.2",
"react-facebook-pixel": "^0.1.3",
"react-ga": "^2.6.0",
"react-helmet": "^5.2.0",
"react-html5-camera-photo": "^1.2.9",
"react-imgpro": "^1.4.1",
"react-modal": "^3.11.1",
"react-overlays": "^1.2.0",
"react-redux": "^6.0.1",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts": "^3.3.0",
"redux": "^4.0.1",
"redux-saga": "^1.0.2",
"secure-ls": "^1.2.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"zip": "gzip -r build"
},
"devDependencies": {
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-prettier": "^2.6.2",
"lint-staged": "^7.2.2",
"prettier": "^1.14.2"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
Complete Log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/macbook/arit-projects/ao-checkoutysc/account-opening-frontend/node_modules/.bin:/Users/macbook/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/macbook/.cargo/bin
9 verbose lifecycle [email protected]~build: CWD: /Users/macbook/arit-projects/ao-checkoutysc/account-opening-frontend
10 silly lifecycle [email protected]~build: Args: [ '-c', 'react-scripts build' ]
11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: react-scripts build
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.
13 verbose stack at EventEmitter.emit (events.js:193:13)
13 verbose stack at ChildProcess.
13 verbose stack at ChildProcess.emit (events.js:193:13)
13 verbose stack at maybeClose (internal/child_process.js:1001:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/macbook/arit-projects/ao-checkoutysc/account-opening-frontend
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v11.13.0
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: react-scripts build
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
This looks like something related to create-react-app? If so, that project has a different repository and is typically maintained by a different set of people, so you'll want to file issues there:
https://github.com/facebook/create-react-app/
That being said, I don't think you've provided enough info for this bug either. You should probably share the full source code (not just the package.json).
Got the error
the issue was in my CSS
@media all and(max-width: 1024px) {
}
I left it blank
Glad you got it sorted out.
I left it blank
Do you mean that the problem was that you had an empty ruleset or that it was the solution?
I left it blank
Do you mean that the problem was that you had an empty ruleset or that it was the solution?
Yes the problem was empty ruleset
Most helpful comment
Got the error
the issue was in my CSS
@media all and(max-width: 1024px) {
}
I left it blank