React project deployment npm run build reported an error

React version 16.2.0, npm run build error has been eject

$ npm run build

> wolf@0.1.0 build 
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

     ./node_modules/query-string/index.js:8

Read more here: http://bit.ly/2tRViJ9

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wolf@0.1.0 build: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wolf@0.1.0 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:
Sep.09,2021

the official has given an explanation. Click on the link:

found that it is official that third-party software packages have not been correctly compiled into ES5 . Check where your code uses these packages, as shown in the figure, try these methods

.

The version of

node.js is reduced to 7.x.


< H3 > one. The cause of the problem

I encountered this problem when I was writing a project today. According to English

Failed to minify the code from this file:
   ./node_modules/query-string/index.js:8

it is obvious that the library query-string failed to compile correctly

two. Solution

downgrade the Query-String library

previously query-string@6.2.0, was successfully lowered to query-string@5.1.1, build
project folder, in the command line:

npm install query-string@5.1.1

Appendix

reference modify link: https://github.com/marmelab/r.

if you have any questions, you are welcome to send private messages

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d2f8-2c366.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d2f8-2c366.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?