Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'internal/fs' #62

Open
KlaasVanDerLinden opened this issue Jul 17, 2017 · 3 comments
Open

Error: Cannot find module 'internal/fs' #62

KlaasVanDerLinden opened this issue Jul 17, 2017 · 3 comments

Comments

@KlaasVanDerLinden
Copy link

cordova -v
7.0.1

npm -v
5.0.3

node -v
v8.1.4

When running the following command:
cordova plugin add cordova-plugin-connectsdk
I get the following error:

Installing "cordova-plugin-connectsdk" for android
Subproject Path: CordovaLib
Subproject Path: cordova-plugin-connectsdk/radio_app-Connect-SDK-Android
Failed to install 'cordova-plugin-connectsdk': Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at evalmachine.:40:20
at Object. (C:\cz-test\plugins\cordova-plugin-connectsdk\scripts\node_modules\unzip\node_modules\fstream\node_modules\graceful-fs\fs.js:11:1)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
Error: Cannot find module 'internal/fs'

This happens after having added the Android platform. Without the platform added, there is no error.

@Bejor
Copy link

Bejor commented Jul 27, 2017

I have got the same Problem.
Is there anyway how I can fix this issue because I am not able to find a Plugin which supports as much Platforms as this Plugin!

cordova -v
7.0.1

npm -v
5.2.0

node -v
v7.9.0

@Bejor
Copy link

Bejor commented Aug 3, 2017

I fixed this issue.

I used the node 6 version via the nvm command and added the android platform on version 5.2.2.
And everything worked perfectly fine.

@lmaiacosta
Copy link

lmaiacosta commented Jan 9, 2018

UP
Someone have a solution to recent versions of cordova?
Failed to install 'cordova-plugin-connectsdk': Error: Cannot find module 'internal/errors'

For now i use the @Bejor solution:
/***** Install NVM (Node Version Mananger) */
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
/
Downgrade node version ******/
nvm install v5.12.0

Apparently it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants