Unable to install google cloud node client module


#1

Hi,

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

Installing...

 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
dash/4.17.10/node_modules/_tmp_7352_6d906ab90149e5488575a77626100eba
cp: cannot stat '/rbd/pnpm-volume/store/2/registry.npmjs.org/lodash/4.17.10/node_modules/lodash/.': No such file or directory

#2

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!


#3

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.

Adnan


#4

Hi @siddiqaa,

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


#5

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

module.js:549

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)

#6

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

@google-cloud/speech

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

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


#7

I’ll look more into it!


#8

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?


#9

Hi @etamponi,

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

Adnan