5

CLIで実行するcreate-react-appと、次のエラー メッセージが返されます。

    $ create-react-app udacity-goals-todo
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module 'fs-extra'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/create-react-app/createReactApp.js:40:12)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)

アンインストールと再インストール、および再インストールを試みcreate-react-appましfs-extraた。

これを再び起動して実行する方法についてのアイデアはありますか?

4

4 に答える 4

4

これは、create-react-app をアンインストールして再インストールすることで修正できます

  • マックユーザー向け

1) ファインダーデスクトップウィジェットを右クリック

2) 「フォルダへ移動」をクリック

3) 「 /usr/local/lib/node_modules 」と入力してから、

4) create-react-app フォルダーを削除します

5) 「 npm i -g create-react-app 」の端末タイプ

  • ウィンドウ ユーザーの場合、globals フォルダーがどこにあるのかわかりません。これを見つけたら更新します
于 2018-07-14T10:18:54.813 に答える