I installed 18.12.1 version of node (the latest at the time), after I discovered that the web application I was building, needed an older version of node. So I tried to install nvm to manage different versions, but being beside a proxy company is not easy. So I uninstalled node and nvm, and installed node 12.22.12, because in a coworker laptop it works fine with this.
After launching npm install
, I launched npx webpack --mode none
but I get this errors (I removed some of them):
[54] ./src/pages/le-tue-dichiarazioni/dichiarazioni-list/dichiarazioni-list.jsx 329 bytes {1} [built] [failed] [1 error]
[55] ./src/pages/dichiarazioni/dichiarazioni-page/dichiarazioni-page.jsx 1.35 KiB {1} [built]
[59] ./src/css/app.css 39 bytes {1} [built]
[60] ./src/logo.svg 44 bytes {1} [built]
[61] ./src/App.css 39 bytes {1} [built]
+ 599 hidden modules
ERROR in ./src/pages/riepilogo/persona-giuridica-fourth-step-dichiarazioni/persona-giuridica-fourth-step-dichiarazioni.jsx 100:47
Module parse failed: Unexpected token (100:47)
You may need an appropriate loader to handle this file type.
| errors: {},
| errorsBkp: {},
> frontespizioIniziale: this.props.history?.location?.state?.frontespizioIniziale != null ? this.props.history.location.state.frontespizioIniziale : {},
| datiContribuente: {
| isPersonaFisica: false
@ ./src/pages/riepilogo/riepilogo-for-list.jsx 16:0-144 168:41-80
@ ./src/App.jsx
ERROR in ./src/pages/le-tue-dichiarazioni/dichiarazioni-list/dichiarazioni-list.jsx 103:44
Module parse failed: Unexpected token (103:44)
You may need an appropriate loader to handle this file type.
| lgth: res.result.length,
| isLoading: false,
> elencoDichiarazioni: res.result?.splice(index, this.state.Pagination.limit)
| });
| } else {
@ ./src/App.jsx 14:0-105 296:55-74
ERROR in ./src/pages/riepilogo/tipo-contribuente-ninth-step-dichiarazioni/tipo-contribuente-ninth-step-dichiarazioni.jsx 111:25
Module parse failed: Unexpected token (111:25)
You may need an appropriate loader to handle this file type.
| handleInputChange(event) {
| event.preventDefault();
> const target = event?.target;
| const value = target?.type === "checkbox" ? target?.checked : target?.value;
| const name = target?.name;
@ ./src/pages/riepilogo/riepilogo-for-list.jsx 13:0-141 178:41-79
@ ./src/App.jsx
ERROR in ./src/pages/riepilogo/versamenti-tenth-step-dichiarazioni/versamenti-tenth-step-dichiarazioni.jsx 118:41
Module parse failed: Unexpected token (118:41)
You may need an appropriate loader to handle this file type.
| id: "estremiVersamento",
| name: "estremiVersamento",
> value: this.props.versamento?.estremiVersamento,
| label: "Estremi del/i versamento/i: (1800 caratteri)",
| error: touched.estremiVersamento && errors.estremiVersamento,
@ ./src/pages/riepilogo/riepilogo-for-list.jsx 14:0-121 180:41-73
@ ./src/App.jsx
ERROR in ./src/pages/dichiarazioni/dichiarazioni-page/dichiarazione-pf-pg/dichiarazione-pg/dichiarazione-pg.jsx 120:47
Module parse failed: Unexpected token (120:47)
You may need an appropriate loader to handle this file type.
| errors: {},
| errorsBkp: {},
> frontespizioIniziale: this.props.history?.location?.state?.frontespizioIniziale != null ? this.props.history.location.state.frontespizioIniziale : {},
| datiContribuente: {
| isPersonaFisica: false
@ ./src/pages/dichiarazioni/dichiarazioni-page/dichiarazione-pf-pg/dichiarazione-pf-pg.jsx 8:0-66
@ ./src/App.jsx
ERROR in ./src/pages/riepilogo/annotazioni-generali-eleventh-step-dichiarazioni/annotazioni-generali-eleventh-step-dichiarazioni.jsx 131:35
Module parse failed: Unexpected token (131:35)
You may need an appropriate loader to handle this file type.
| }, /*#__PURE__*/React.createElement("div", {
| className: "form-group"
> }), this.props.annotazioni?.length != 0 ? this.props.annotazioni.map((element, index) => /*#__PURE__*/React.createElement("div", {
| className: "form-group",
| key: index
@ ./src/pages/riepilogo/riepilogo-for-list.jsx 6:0-159 182:41-85
@ ./src/App.jsx
ERROR in ./src/pages/dichiarazioni/dichiarazioni-page/dichiarazione-pf-pg/dichiarazione-pf/dichiarazione-pf.jsx 132:47
Module parse failed: Unexpected token (132:47)
You may need an appropriate loader to handle this file type.
| capSedeItaliaPNF: "",
| statoSedeEsteroPNF: "",
> frontespizioIniziale: this.props.history?.location?.state?.frontespizioIniziale != null ? this.props.history.location.state.frontespizioIniziale : {},
| datiContribuente: {
| isPersonaFisica: false
@ ./src/pages/dichiarazioni/dichiarazioni-page/dichiarazione-pf-pg/dichiarazione-pf-pg.jsx 9:0-66 25:44-59
@ ./src/App.jsx
On another coworker laptop with node 12.14.1
it runs without errors too, so I tried to uninstall and install this version and launch npm
and after npx
, but on the npx
I get the same errors.
So I made a new attempt using another laptop with no node installed. There I installed the 12.14.1, and the npx
command run without errors there too.
I checked my environment variable, but I didn't find anything noticeable. The attempts that I made was done with new "fresh" code downloaded from the repository in a new folder, just to be totally sure to not have some temporary file in the project.
After several uninstall now launching node -v
it says: v12.22.12 and npx -v
says: 6.14.16
I run out of ideas, what do you suggest to do now?