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

riot-desktop: mkdirp is not recognized as an internal or external command, #14056

Closed
xobs opened this issue Jun 16, 2020 · 5 comments
Closed
Labels

Comments

@xobs
Copy link
Contributor

xobs commented Jun 16, 2020

Description

According to the install instructions at https://github.com/vector-im/riot-desktop, the following command must be run to "Fetch the prebuilt release Riot package":

[7:16:30 PM] D:/Code/Riot/riot-desktop> yarn run fetch --noverify --cfgdir ''
yarn run v1.22.4
$ yarn run mkdirs && node scripts/fetch-package.js --noverify --cfgdir
$ mkdirp packages deploys
'mkdirp' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[7:16:36 PM] D:/Code/Riot/riot-desktop>

Steps to reproduce

  • Check out https://github.com/vector-im/riot-desktop
  • Run the specified command yarn run fetch --noverify --cfgdir ''

If there are additional steps that must be run, they should be indicated.
Logs being sent: kinda?

  • Platform: Windows 10 1903
@xobs xobs added the T-Defect label Jun 16, 2020
@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2020

Sounds like you didn't install the dependencies as mkdirp is one of them: https://github.com/vector-im/riot-desktop/blob/develop/package.json#L52

Try run yarn first as per all Node/npm/yarn projects to install the dependencies.

@xobs
Copy link
Contributor Author

xobs commented Jun 16, 2020

I'm not familiar with yarn, so I didn't know that was a prerequisite. That should be added to the README. I can make a PR to add it, once I get things building.

Doing yarn does get a bit further, however there are other issues. For example, quotes appear to be improperly parsed:

[7:25:15 PM] D:/Code/Riot/riot-desktop> yarn run fetch --noverify --cfgdir ''
yarn run v1.22.4
$ yarn run mkdirs && node scripts/fetch-package.js --noverify --cfgdir
$ mkdirp packages deploys
No config directory set
Specify a config directory with --cfgdir or -d
To build with no config (and no auto-update), pass the empty string (-d '')
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[7:25:44 PM] D:/Code/Riot/riot-desktop>

If I use cmd.exe instead, or alternately specify the cfgdir as "''", it gets a bit further:

D:\Code\Riot\riot-desktop>yarn run fetch --noverify --cfgdir ''
yarn run v1.22.4
$ yarn run mkdirs && node scripts/fetch-package.js --noverify --cfgdir ''
$ mkdirp packages deploys
Downloading https://github.com/vector-im/riot-web/releases/download/v1.6.5/riot-v1.6.5.tar.gz...
Failed to download https://github.com/vector-im/riot-web/releases/download/v1.6.5/riot-v1.6.5.tar.gz Error: Remote end closed socket abruptly.
    at TLSSocket.on_socket_end (D:\Code\Riot\riot-desktop\node_modules\needle\lib\needle.js:479:17)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

D:\Code\Riot\riot-desktop>

This appears to be caused by a bug in a package called needle: tomas/needle#312

@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2020

The dependency specified of needle is ^2.3.2 which includes the fixed version, sounds like your system may have had an older version cached and used that instead. I will make a PR to specify a stricter dependency version to avoid this cache mismatch in the future.

@xobs
Copy link
Contributor Author

xobs commented Jun 16, 2020

As I said, I'm not very well versed in Javascript development, and I'm not familiar with Yarn at all, but doesn't this mean it will prefer v2.3.2: https://github.com/vector-im/riot-desktop/blob/develop/yarn.lock#L3056-L3063

I thought lock files caused it to prefer a well-known version.

@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2020

Fair point, anyhow element-hq/element-desktop#101 will fix it.

@t3chguy t3chguy closed this as completed Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants