Сборка застревает на 91% после запуска npm - PullRequest
0 голосов
/ 31 мая 2018

Внезапно эта ошибка появилась, когда я запустил npm run.Проект построен с использованием ant-design pro.Грустная часть состоит в том, что это не говорит мне, где ошибка.Не могли бы вы помочь мне найти ошибку или исправить ее?Сборка просто зависает на 91%, а затем я получаю сообщение об ошибке.

Вот ошибка:

 build [==================  ] 91%(node:6978) UnhandledPromiseRejectionWarning: RangeError: Invalid string length
    at formatError (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Stats.js:223:30)
    at Array.map (<anonymous>)
    at Stats.toJson (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Stats.js:230:31)
    at Compiler.<anonymous> (/home/teks/trips/may26th/smarttrips_react/node_modules/html-webpack-plugin/index.js:68:44)
    at Compiler.applyPluginsAsyncSeries (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:206:13)
    at Compiler.emitAssets (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:354:8)
    at onCompiled (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:58:19)
    at applyPluginsAsync.err (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/Compiler.js:510:14)
    at next (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:202:11)
    at Compiler.<anonymous> (/home/teks/trips/may26th/smarttrips_react/node_modules/webpack/lib/CachePlugin.js:78:5)
    at next (/home/teks/trips/may26th/smarttrips_react/node_modules/tapable/lib/Tapable.js:204:14)
    at /home/teks/trips/may26th/smarttrips_react/node_modules/hard-source-webpack-plugin/index.js:2075:7
    at <anonymous>
(node:6978) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6978) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

РЕДАКТИРОВАТЬ: Я также обновил свой npm до версии 6, но все равно получаю то же самоесообщение об ошибке.пожалуйста, сообщите.

1 Ответ

0 голосов
/ 02 июня 2018

Ну, я искал, и теперь я нашел опубликованную проблему, которая помогла мне.В основном, добавление этого кода в мой package.json помогло мне.

"start": "HARD_SOURCE=none npm run _start", "_start": "cross-env ESLINT=none roadhog dev",

Я не мог понять гораздо больше, почему, поскольку он был написан на китайском, в любом случае, вот ссылка на проблему с github, так какможет помочь некоторым из вас понять, что было не так. Исправлена ​​проблема antdesign github

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...