I'm trying to compile a work repository on my personal computer (so I can work remotely), but every time I run npm start
I get these messages:
npm ERR! Cannot read property 'match' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /home/thiago/.npm/_logs/2019-12-14T14_08_32_310Z-debug.log
Well, following tons of websites I did (countless times) rm -rf package-lock.json /node_modules
After that, I can follow with the installation of the modules and it generates a new package-lock.json
Then, when I run npm start
I get the following error:
ERROR in ./node_modules/css-loader/dist/cjs.js??ref--2-1!./node_modules/postcss-loader/lib??ref--2-2!./node_modules/resolve-url-loader??ref--2-3!./node_modules/sass-loader/dist/cjs.js??ref--2-4!./node_modules/bootstrap/dist/css/bootstrap.css
Module build failed: Syntax Error
(4664:2) Unclosed block
4662 |
4663 | .navbar-light .navbar-toggler-icon {
> 4664 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
| ^
4665 | }
4666 |
@ ./node_modules/bootstrap/dist/css/bootstrap.css 4:14-221 18:2-22:4 19:20-227
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://0.0.0.0:3000 webpack/hot/dev-server babel-polyfill react-hot-loader/patch webpack-dev-server/client?http://0.0.0.0:3000 webpack/hot/only-dev-server whatwg-fetch ./src/index
Child html-webpack-plugin for "index.html":
1 asset
[./node_modules/html-webpack-plugin/lib/loader.js!./index.hbs] ./node_modules/html-webpack-plugin/lib/loader.js!./index.hbs 716 bytes {0} [built]
[./node_modules/lodash/lodash.js] ./node_modules/lodash/lodash.js 541 kB {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]
webpack: Failed to compile.
I tried to search a lot about it! But unfortunately, I don't get any clue. It's a webpack problem? Or bootstrap? Post-CSS? Or even none of those? Thank you very much for your attention. I much appreciate any help.
EDIT: A friend helped me and I decide to delete the class that caused the error Another error appears:
ERROR in ./node_modules/css-loader/dist/cjs.js??ref--2-1!./node_modules/postcss-loader/lib??ref--2-2!./node_modules/resolve-url-loader??ref--2-3!./node_modules/sass-loader/dist/cjs.js??ref--2-4!./node_modules/bootstrap/dist/css/bootstrap.css
Module build failed: Syntax Error
(4709:2) Unclosed block
4707 |
4708 | .navbar-dark .navbar-toggler-icon {
> 4709 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
| ^
4710 | }
4711 |
I also deleted this too and now it runs perfectly!
Well, if somebody knows why this happens and what is wrong, I very much appreciate it. Thank you very much.