簡體   English   中英

create-react-app 編譯失敗,但進程不會退出

[英]create-react-app failed to compile, but process won't exit

我有一個使用create-react-app ,我有一個奇怪的問題,即當出現錯誤時腳本不會退出,本質上是:

~/my-project$ ./node_modules/.bin/react-scripts build
Creating an optimized production build...
Failed to compile.

./src/library/index.ts
Cannot find file './ApiClient.generated' in './src/library'.


I can continue typing into my terminal 

當文件存在時,我可以正確構建和編譯項目。

~/my-project$ node -v
v14.5.0
~/my-project$ npm -v
6.14.5
~/my-project$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:        20.04
Codename:       focal

有沒有人有任何想法?

它認為我會在我發布此評論后找到答案,表明這是node-sass的問題。 sass替換它可以解決問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM