Je suis nouveau à Réagir et je suis en train de construire une application de réaction en utilisant create-react-app et Watson node-sdk. Tout fonctionne correctement en mode développement après avoir exécuté npm start
. Mais quand je tente de construire un paquet de production en utilisant npm run build
et ci-dessous est l'erreur que je reçois.créer-réagir-app npm exécuter construire échouer à minify watson noeud sdk
e:\Microsoft\Workspace\React\myapp>npm run build
> [email protected] build e:\Microsoft\Workspace\React\myapp
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/watson-developer-cloud/lib/helper.js:31
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
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! C:\Users\yk\AppData\Roaming\npm-cache\_logs\2017-09-
20T09_40_36_144Z-debug.log
La ligne que l'erreur est de donner let missing;
et semble que le let
est l'origine du problème. Est-ce que je peux faire quelque chose avec ça?
Pouvez-vous s'il vous plaît montrer plus de code à partir du fichier ./node_modules/watson-developer-cloud/lib/helper.js? qui provoque l'erreur? –
c'est parti. https://github.com/watson-developer-cloud/node-sdk/blob/d5909a19d8846a9e7a104242a193b7f54c69c4ca/lib/helper.js#L31 – yk1007