Getting trouble integrating google-cloud with webpack

I integrate the npm package into Google Cloud with my responsive application and I use firebase.

Mistakes I am facing -

WARNING c. /~/google-cloud/~/hash-stream-validation/index.js Module not found: Error: Cannot resolve "fast-crc32c" in '/ Home / linuxbox / React-Workspace / Kaptify / node_modules / Google cloud / node_modules / hash stream-validation '@. / ~ / google-cloud / ~ / hash-stream-validation / index.js 5: 8-30 @. /~/google-cloud/~/@google-cloud/storage/src/file.js @. /~/google-cloud/~/@google-cloud/storage/src/index.js @. /~/google-cloud/src/index.js @. / src / actions / UserStateStore.js @. /app.js @multi (webpack) -dev-server / client? http://127.0.0.1:3000 webpack / hot / dev-server. / app.js

WARNING c. /~/google-cloud/~/google-auto-auth/index.js 53: 13-58 Critical dependency: requesting a dependency is an expression

WARNING c. / ~ / google-cloud / ~ / grpc / src / node / src / grpc_extension.js 38: 14-35 Critical dependency: the request for the dependency is Expression

WARNING. / ~ / Google-cloud / ~ / node-pre-gyp / lib / pre-binding.js 19: 22-48 Critical dependency: dependency request is an expression

WARNING. / ~ / Google-cloud / ~ / node-pre-gyp / lib / util / versioning.js 15: 20-67 Critical Dependency: The dependency request is an Expression

Can someone help me solve this?

+4
source share
1 answer

, webpack, , google-cloud .

-:

config = {
    // ...
    externals: {
        '@google-cloud/storage': 'commonjs @google-cloud/storage'
    },
    // ...
}

, , (. Backend Apps Webpack). webpack externals , . , require() 'ed node_modules, .

- , webpack-node-externals, .

+2

Source: https://habr.com/ru/post/1672789/


All Articles