Strapi: An error occurred during plugin installation with Yarn

Created on 24 Aug 2018  路  3Comments  路  Source: strapi/strapi

Informations

  • Node.js version: 10.9.0
  • npm version: 6.2.0
  • Yarn version: 1.9.4
  • Strapi version: 3.0.0-alpha.13.1
  • Database: MongoDB
  • Operating system: Ubuntu 18.04

What is the current behavior?
When I run the command strapi new my-project the installation was completed but not any plugin is installed.
For each plugins I have this kind of error:

An error occurred during upload plugin installation.
{ Error: Command failed: node /home/*/.config/yarn/global/node_modules/strapi/bin/strapi.js install upload 
mkdir: missing operand
Try 'mkdir --help' for more information.
ShellJS: internal error
Error: ENOENT: no such file or directory, open './plugins/upload/package.json'
    at Object.openSync (fs.js:434:3)
    at touchFile (/home/*/.config/yarn/global/node_modules/shelljs/src/touch.js:67:19)
    at /home/*/.config/yarn/global/node_modules/shelljs/src/touch.js:46:5
    at Array.forEach (<anonymous>)
    at Object._touch (/home/*/.config/yarn/global/node_modules/shelljs/src/touch.js:45:9)
    at Object.touch (/home/*/.config/yarn/global/node_modules/shelljs/src/common.js:399:25)
    at Command.module.exports (/home/*/.config/yarn/global/node_modules/strapi/bin/strapi-install.js:65:13)
    at Command.listener (/home/*/.config/yarn/global/node_modules/strapi-utils/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:182:13)
    at Command.EventEmitter.emit (domain.js:442:20)
    at ChildProcess.exithandler (child_process.js:289:12)
    at ChildProcess.emit (events.js:182:13)
    at ChildProcess.EventEmitter.emit (domain.js:442:20)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
  killed: false,
  code: 1,
  signal: null,
  cmd:
   'node /home/*/.config/yarn/global/node_modules/strapi/bin/strapi.js install upload ' }

And when I start the app and access to the admin panel there is -indeed- zero plugin installed.

Steps to reproduce the problem
Just run strapi new my-project.

What is the expected behavior?
A complete installation with all default plugins.

low bug

Most helpful comment

Hello @quibaritaenperdresatrompe, some work has been done to make it works well with Yarn but not all complete.

I suggest you to use Strapi with npm because Yarn is not our priority now.

If you want absolutely Yarn support rapidly feel free to investigate on your side and submit a PR.
Every contribution on Strapi is appreciated to make the project better.

Check out the contributing guide to get started: https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md

All 3 comments

@quibaritaenperdresatrompe can you try installing strapi with node, I believe Yarn support is still pretty early. @lauriejim was working on it.

Hello @quibaritaenperdresatrompe, some work has been done to make it works well with Yarn but not all complete.

I suggest you to use Strapi with npm because Yarn is not our priority now.

If you want absolutely Yarn support rapidly feel free to investigate on your side and submit a PR.
Every contribution on Strapi is appreciated to make the project better.

Check out the contributing guide to get started: https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md

I had the same problem on windows. After searching for a lot of solutions, finally I catch the error: My Windows sesion had a space in the middle of the name. After fix that, the installation works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isabellachen picture isabellachen  路  3Comments

dufoli picture dufoli  路  3Comments

monkibraum picture monkibraum  路  3Comments

OrestTs picture OrestTs  路  3Comments

Rashidul420222 picture Rashidul420222  路  3Comments