Unable to install google cloud node client module


I am trying to install @google-cloud/speech module via package.json by adding “@google-cloud/storage”: “^1.7.0”, to the dependencies.

The installation completes but I get following error and can’t import the @google-cloud/speech in my server script.:

node v8.11.2, with pnpm


 WARN  Moving express that was installed by a different package manager to "node_modules/.ignored

ERROR  ENOTEMPTY: directory not empty, rename '/rbd/pnpm-volume/05abdb3f-7f27-4601-a1bc-d091b1ad125a/node_modules/express' -> '/rbd/pnpm-volume/05abdb3f-7f27-4601-a1bc-d091b1ad125a/node_modules/.ignored/express'

If I try installing the module using pnpm in console, I get the following error:

$ pnpm install @google-cloud/speech
A store server is running. All store manipulations are delegated to it.
 WARN  using --shamefully-flatten is discouraged, you should declare all of your dependencies in package.json
Packages: +221
 ERROR  Command failed: cp -r --reflink /rbd/pnpm-volume/store/2/registry.npmjs.org/lodash/4.17.10/node_modules/lodash/. /rbd/pnpm-volume/05abdb3f-7f27-4601-a1bc-d091b1ad125a/node_modules/.registry.npmjs.org/lo
cp: cannot stat '/rbd/pnpm-volume/store/2/registry.npmjs.org/lodash/4.17.10/node_modules/lodash/.': No such file or directory
1 Like

Hi @siddiqaa,

thanks for your report! We are investigating on this issue, but we haven’t found the root cause yet. If it happens again, please provide your project name or it is very difficult for us to troubleshoot.

As a temporary workaround, you can try to switch to npm by running enable-npm in the console. The installation should now work. The main issue with npm is that node_modules will take space in your project, and it’s slower than pnpm. We’ll let you know when the issue is fixed so that you can switch back to pnpm with enable-pnpm. Thanks!

1 Like

Dear Emanuele,

Thank you for the update. My project name is salesquota. The error kept re occurring so I have not tried to install again.


Hi @siddiqaa,

I am pretty sure I’ll be finally able to deploy the fix tomorrow :slight_smile:


Hi @etamponi

Was there an updated pushed out? I am now getting the following error without any changes on my part after the system was working fine for several days since my error report since a few hours ago


throw err;


Error: Cannot find module ‘express’

at Function.Module._resolveFilename (module.js:547:15)

at Function.Module._load (module.js:474:25)

at Module.require (module.js:596:17)

at require (internal/module.js:11:18)

at Object. (/app/server.js:7:15)

at Module._compile (module.js:652:30)

at Object.Module._extensions..js (module.js:663:10)

at Module.load (module.js:565:32)

at tryModuleLoad (module.js:505:12)

at Function.Module._load (module.js:497:3)

Ok, I removed the following package from packages.json:


and did enable-npm followed by enable-pnpm and the error went away

so the @google-cloud/* modules are still causing trouble

I’ll look more into it!

Hi @siddiqaa,

I just tried to reproduce your issue with @google-cloud/speech, but I was always able to install it correctly. Can you try again?

Hi @etamponi,

Thanks, yes - I was also add the module now. Thank you.