1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Module not found: Error:Can't resolve './operations_client_config'の解決

Posted at

状況

webpackでCloud APIを利用するソースをbuildしようとした際に発声。

エラー内容

ERROR in ./node_modules/google-gax/build/src/operationsClient.js
Module not found: Error: Can't resolve './operations_client_config' in '/home/{ユーザ名}/ドキュメント/GoogleHomeMiniNotification/node_modules/google-gax/build/src'
 @ ./node_modules/google-gax/build/src/operationsClient.js 21:19-56
 @ ./node_modules/google-gax/build/src/index.js
 @ ./node_modules/@google-cloud/pubsub/build/src/v1/publisher_client.js
 @ ./node_modules/@google-cloud/pubsub/build/src/v1/index.js
 @ ./node_modules/@google-cloud/pubsub/build/src/index.js
 @ ./src/SpeechProcess.ts
 @ ./src/index.ts
npm ERR! code ELIFECYCLE

対応

webpack.config.jsのresolve.extensionsに'.json'を追加。

resolve : {
    extensions : {
        '.ts', '.js', '.json'
    }
}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?