Fomantic-UI icon indicating copy to clipboard operation
Fomantic-UI copied to clipboard

pnpm install fomantic-ui fails

Open slavb18 opened this issue 5 years ago • 3 comments

Bug Reportm

Steps to reproduce

  1. pnpm init -y
  2. pnpm install fomantic-ui

Expected result

fomantic-ui installed without error

Actual result

.../node_modules/fomantic-ui install$ gulp install
│ [14:32:44] Using gulpfile ~/work/examples/test/node_modules/.pnpm/[email protected]/node_modules/fomantic-ui/gulpfile.js
│ [14:32:44] Starting 'install'...
│ SUI is a sub-module, skipping end-user install
│ [14:32:44] The following tasks did not complete: install
│ [14:32:44] Did you forget to signal async completion?
└─ Failed in 1.3s
 ERROR  Command failed with exit code 1.

Testcase

Screenshot (if possible)

Version

2.8.7

slavb18 avatar Feb 25 '21 10:02 slavb18

Please try pnpx gulp build instead of gulp install..otherwise pnpm as well as yarn or node 15+ is not officially supported and needs somebody to help the project with a proper PR

lubber-de avatar Feb 25 '21 11:02 lubber-de

fomantic-ui's install script tries some "magic" with searching the directory tree (check if it is subdependency, a.s.o.), which does not really work with the symlinks, pnpm is using. This can be seen from the error message

node_modules/.pnpm/[email protected]/node_modules/fomantic-ui: Running install script, failed in 1.7s

while it normally would be located in

node_modules/fomantic-ui

which however, is a symlink to the former.

Maybe, the install script could change behaviour depending on environment

npm_execpath: '...\\node_modules\\pnpm\\bin\\pnpm.cjs',

or if __dirname contains node_modules/.pnpm - package.json as well as semantic.json should be siblings to this node_modules and files could be copied there from __dirname according to config in semantic.json.

This would be for updates only - interactive configuration will not work of course.

Anyway, in general I don't think it's a great idea to be that directory tree dependent: https://yarnpkg.com/advanced/rulebook#modules-shouldnt-hardcode-node_modules-paths-to-access-other-modules

jeffrson avatar Feb 16 '22 18:02 jeffrson

Fixed bx #2280

lubber-de avatar Mar 24 '22 21:03 lubber-de