skip to Main Content

I want to start some react project. The issue is when I run the following command: yarn add react-app-rewired -D to install all the required components.

Output:

Microsoft Windows [Version 10.0.19045.2965]
(c) Microsoft Corporation. All rights reserved.

C:WINDOWSsystem32>cd C:wamp64wwwinsurance_site-master

C:wamp64wwwinsurance_site-master>yarn add react-app-rewired -D
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: use String.prototype.padStart()
warning react-scripts-ts > [email protected]: out of support
warning react-scripts-ts > [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
warning react-scripts-ts > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning react-scripts-ts > fork-ts-checker-webpack-plugin > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts-ts > webpack > [email protected]: This is probably built in to whatever tool you're using. If you still need it... idk
warning react-scripts-ts > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-scripts-ts > fork-ts-checker-webpack-plugin > chokidar > [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
warning react-scripts-ts > webpack-dev-server > sockjs > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-scripts-ts > css-loader > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning react-scripts-ts > css-loader > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning react-scripts-ts > css-loader > cssnano > postcss-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning react-scripts-ts > jest > jest-cli > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning react-scripts-ts > css-loader > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning react-scripts-ts > css-loader > cssnano > postcss-merge-rules > postcss-selector-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
warning react-scripts-ts > jest > jest-cli > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts-ts > [email protected]: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
warning react-scripts-ts > fsevents > [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
warning react-scripts-ts > fsevents > node-pre-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-scripts-ts > fsevents > node-pre-gyp > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning react-scripts-ts > fsevents > node-pre-gyp > request > [email protected]: this library is no longer supported
warning react-scripts-ts > fsevents > node-pre-gyp > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-scripts-ts > fsevents > node-pre-gyp > tar-pack > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning react-scripts-ts > fsevents > node-pre-gyp > [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning react-scripts-ts > fsevents > node-pre-gyp > request > [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning react-scripts-ts > jest > jest-cli > jest-runtime > babel-core > babel-register > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > cryptiles > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > boom > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning react-scripts-ts > fsevents > node-pre-gyp > hawk > sntp > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts-ts > sw-precache-webpack-plugin > [email protected]: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
warning react-scripts-ts > sw-precache-webpack-plugin > sw-precache > [email protected]: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
warning react-select-2 > less > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning react-select-2 > webpack > [email protected]: This is probably built in to whatever tool you're using. If you still need it... idk
warning react-select-2 > webpack-dev-server > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
warning react-select-2 > jest-cli > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning react-select-2 > [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning react-select-2 > babel-cli > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning react-select-2 > [email protected]: 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/
warning react-select-2 > postcss-cssnext > postcss-pseudo-class-any-link > postcss-selector-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
warning react-select-2 > image-webpack-loader > imagemin-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning react-select-2 > babel-cli > babel-polyfill > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning react-select-2 > postcss-cssnext > pixrem > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning react-select-2 > postcss-assets > assets > [email protected]: 2.1.0 contains breaking changes, published instead as 3.0.0
warning react-select-2 > postcss-assets > assets > [email protected]: 2.1.0 contains breaking changes, published instead as 3.0.0
warning react-select-2 > postcss-assets > assets > [email protected]: 2.1.0 contains breaking changes, published instead as 3.0.0
warning react-select-2 > image-webpack-loader > imagemin-gifsicle > exec-buffer > tempfile > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-select-2 > image-webpack-loader > imagemin-gifsicle > gifsicle > bin-build > tempfile > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-select-2 > image-webpack-loader > imagemin-gifsicle > gifsicle > bin-build > decompress > buffer-to-vinyl > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning react-select-2 > image-webpack-loader > imagemin-gifsicle > gifsicle > bin-build > download > gulp-decompress > [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning @types/react-router-dom > @types/[email protected]: This is a stub types definition. history provides its own type definitions, so you do not need this installed.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning " > [email protected]" has unmet peer dependency "webpack@>=2".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
warning " > [email protected]" has unmet peer dependency "webpack@^1 || ^2 || ^3 || ^4".
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0".
warning " > [email protected]" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning " > [email protected]" has incorrect peer dependency "react-app-rewired@^1.5.2".
warning "react-app-rewire-less > [email protected]" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning " > [email protected]" has unmet peer dependency "[email protected]".
warning " > [email protected]" has incorrect peer dependency "[email protected]".
warning "react-scripts-ts > [email protected]" has incorrect peer dependency "typescript@^2.1.0".
warning "react-scripts-ts > [email protected]" has incorrect peer dependency "[email protected]".
warning "react-select-2 > [email protected]" has unmet peer dependency "sync-exec@^0.6.2".
warning "react-select-2 > [email protected]" has unmet peer dependency "caniuse-db@^1.0.30000652".
warning "react-select2 > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-rc || ^15.0.0".
warning "react-select2 > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0-rc || ^15.0.0".
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning " > [email protected]" has unmet peer dependency "[email protected]".
[4/4] Building fresh packages...
[1/12] ⠂ node-sass
[11/12] ⠂ cwebp-bin
[-/12] ⠂ waiting...
[-/12] ⠂ waiting...
error C:wamp64wwwinsurance_site-masternode_modulesnode-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: C:wamp64wwwinsurance_site-masternode_modulesnode-sass
Output:
Building: C:nodejsnode.exe C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\nodejs\node.exe',
gyp verb cli   'C:\wamp64\www\insurance_site-master\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:13:12)
gyp verb `which` failed     at F (C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:68:19)
gyp verb `which` failed     at E (C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:80:29)
gyp verb `which` failed     at C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at C:wamp64wwwinsurance_site-masternode_modulesisexeindex.js:42:5
gyp verb `which` failed     at C:wamp64wwwinsurance_site-masternode_modulesisexewindows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:208:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:13:12)
gyp verb `which` failed     at F (C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:68:19)
gyp verb `which` failed     at E (C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:80:29)
gyp verb `which` failed     at C:wamp64wwwinsurance_site-masternode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at C:wamp64wwwinsurance_site-masternode_modulesisexeindex.js:42:5
gyp verb `which` failed     at C:wamp64wwwinsurance_site-masternode_modulesisexewindows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:208:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:Python27python.EXE
gyp verb check python version `C:Python27python.EXE -c "import sys; print "2.7.18
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 18.16.0
gyp verb command install [ '18.16.0' ]
gyp verb install input version string "18.16.0"
gyp verb install installing version: 18.16.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 18.16.0
gyp verb build dir attempting to create "build" dir: C:wamp64wwwinsurance_site-masternode_modulesnode-sassbuild
gyp verb build dir "build" dir needed to be created? C:wamp64wwwinsurance_site-masternode_modulesnode-sassbuild
gyp verb find vs2017 Found installation at: C:Program FilesMicrosoft Visual Studio2022Enterprise
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.Windows10SDK.19041
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017   - Missing Visual Studio C++ core features (Microsoft.VisualStudio.VC.MSBuild.Base)
gyp verb find vs2017   - Some required components are missing, not using this installation
gyp verb find vs2017 Found installation at: C:Program Files (x86)Microsoft Visual Studio2019Enterprise
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.Windows10SDK.19041
gyp verb find vs2017   - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017   - Using this installation with Windows 10 SDK
gyp verb find vs2017 using installation: C:Program Files (x86)Microsoft Visual Studio2019Enterprise
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:wamp64wwwinsurance_site-masternode_modulesnode-sassbuildconfig.gypi
(node:5784) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp verb config.gypi checking for gypi file: C:wamp64wwwinsurance_site-masternode_modulesnode-sassconfig.gypi
gyp verb common.gypi checking for gypi file: C:wamp64wwwinsurance_site-masternode_modulesnode-sasscommon.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:Python27python.EXE
gyp info spawn args [
gyp info spawn args   'C:\wamp64\www\insurance_site-master\node_modules\node-sass\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\wamp64\www\insurance_site-master\node_modules\node-sass\build\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\wamp64\www\insurance_site-master\node_modules\node-sass\node_modules\node-gyp\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\Users\cobra\.node-gyp\18.16.0\include\node\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\Users\cobra\.node-gyp\18.16.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\wamp64\www\insurance_site-master\node_modules\node-sass\node_modules\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\Users\cobra\.node-gyp\18.16.0\<(target_arch)\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\wamp64\www\insurance_site-master\node_modules\node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\wamp64\www\insurance_site-master\node_modules\node-sass\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgypgyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgyp__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgyp__init__.py", line 538, in main
    return gyp_main(args)
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgyp__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgyp__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgypinput.py", line 2783, in Load
    variables, includes, depth, check, True)
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgypinput.py", line 399, in LoadTargetBuildFile
    includes, True, check)
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgypinput.py", line 271, in LoadOneBuildFile
    aux_data, includes, check)
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgypinput.py", line 308, in LoadBuildFileIncludesIntoDict
    LoadOneBuildFile(include, data, aux_data, None, False, check),
  File "C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gypgyppylibgypinput.py", line 251, in LoadOneBuildFile
    None)
  File "C:Userscobra.node-gyp18.16.0includenodecommon.gypi", line 1
    e_data_file_flag%': 1
                        ^
SyntaxError: EOL while scanning string literal
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:wamp64wwwinsurance_site-masternode_modulesnode-sassnode_modulesnode-gyplibconfigure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\nodejs\node.exe" "C:\wamp64\www\insurance_site-master\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:wamp64wwwinsurance_site-masternode_modulesnode-sass
gyp ERR! node -v v18.16.0

C:wamp64wwwinsurance_site-master>

I have Node.js version: v18.16.0 installed. Python 2.7.18 is installed on my system as well and added to the PATH. Also, I have Visual Studio 2017/2019/2022 installed.

[04.06.2023]

Ok. I have fixed it by downgrading the node to: v16.20.0. But when I run npm start I get another issue:

C:UserscobraDocumentsProjectsReactJSinsurance_site-master>npm start

> [email protected] prestart
> yarn run build

yarn run v1.22.19
$ yarn run build:client && yarn run build:server
$ react-app-rewired build
Creating an optimized production build...
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.2.1 <3.5.0

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
Failed to compile.

C:/Users/cobra/Documents/Projects/ReactJS/insurance_site-master/node_modules/@types/babel__traverse/index.d.ts
TypeScript error in C:/Users/cobra/Documents/Projects/ReactJS/insurance_site-master/node_modules/@types/babel__traverse/index.d.ts(321,9):
Type expected.  TS1110

    319 |     // too complex for TS. So we type it as a general visitor only if the key contains `|`
    320 |     // this is good enough for non-visitor traverse options e.g. `noScope`
  > 321 |     [k: `${string}|${string}`]: VisitNode<S, Node>;
        |         ^
    322 | };
    323 |
    324 | export type VisitNode<S, P extends Node> = VisitNodeFunction<S, P> | VisitNodeObject<S, P>;


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Package.json: https://mega.nz/file/4BQlxAIC#vo76cLx6vvHVhVolYGtCFOmClqhb43o9CVNufg3gbhM

Any ideas how to resolve this issue? Thank you.

2

Answers


  1. Chosen as BEST ANSWER

    Finally, I have fixed this issue. Here are my instructions:

    1. Use Node.js version 14
    2. Install all components using this command: yarn add [email protected] -D
    3. Open package.json file and in devDependencies set typescript to 4.1.5 version
    4. Additionally, in devDependencies set @types/react-router-dom to "^5.3.3"
    5. Find old syntax in the source code like this: const App: React.FC = (props: any) => { and change/update to this new systax: const App = (props: any) => { by removing : React.FC all occurrences in project
    6. Open webpack.server.config.js file and set mode to production.
    7. Run the project in the browser using http://localhost:3101

    So, this issue is resolved. Thanks.


  2. Most likely, the versions of the packages used in your project are not compatible with node v18. Try to downgrade the node to an older version (see How to change to an older version of Node.js). Start from v16, next try to change to v14 or v12 until the errors are disappeared. This should help.

    Note, upgrading the package versions usually causes more issues, so it’s better not to try this in most cases.

    Also, you can try to downgrade yarn.

    UPD: seems, v16 has not worked. Try v14 or v12.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search