Title: `docsify` fails under yarn pnp strict mode due to missing `ansi-colors` dependency · Issue #191 · docsifyjs/docsify-cli · GitHub
Open Graph Title: `docsify` fails under yarn pnp strict mode due to missing `ansi-colors` dependency · Issue #191 · docsifyjs/docsify-cli
X Title: `docsify` fails under yarn pnp strict mode due to missing `ansi-colors` dependency · Issue #191 · docsifyjs/docsify-cli
Description: Yarn (v2/3) by default operates in a strict Plug'n'Play mode which does not allow directly loading indirect dependencies. lib/commands/init.js directly requires ansi-colors, but it's not listed in package.json. yarn run docsify, therefor...
Open Graph Description: Yarn (v2/3) by default operates in a strict Plug'n'Play mode which does not allow directly loading indirect dependencies. lib/commands/init.js directly requires ansi-colors, but it's not listed in ...
X Description: Yarn (v2/3) by default operates in a strict Plug'n'Play mode which does not allow directly loading indirect dependencies. lib/commands/init.js directly requires ansi-colors, but it's no...
Opengraph URL: https://github.com/docsifyjs/docsify-cli/issues/191
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`docsify` fails under yarn pnp strict mode due to missing `ansi-colors` dependency","articleBody":"Yarn (v2/3) by default operates in a strict Plug'n'Play mode which does not allow directly loading indirect dependencies.\r\n\r\n`lib/commands/init.js` directly requires `ansi-colors`, but it's not listed in `package.json`.\r\n\r\n`yarn run docsify`, therefore, fails (even if `docsify-cli` is correctly registered in `package.json`).\r\n\r\nAdding `\"ansi-colors\": \"^4.1.1\"` to `dependencies` should be enough (I chose that version because it's what's already in `package-lock.json` from an indirect dependency).\r\n\r\n```shellsession\r\n$ yarn run docsify\r\n/Users/tlilley/projects/veatech/sbx/smithy/.pnp.cjs:11796\r\n throw firstError;\r\n ^\r\n\r\nError: docsify-cli tried to access ansi-colors, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\r\n\r\nRequired package: ansi-colors\r\nRequired by: docsify-cli@npm:4.4.4 (via /Users/tlilley/projects/veatech/sbx/smithy/.yarn/cache/docsify-cli-npm-4.4.4-3d7dbcc799-2f72ff07d0.zip/node_modules/docsify-cli/lib/commands/)\r\n\r\nRequire stack:\r\n- /Users/tlilley/projects/veatech/sbx/smithy/.yarn/cache/docsify-cli-npm-4.4.4-3d7dbcc799-2f72ff07d0.zip/node_modules/docsify-cli/lib/commands/init.js\r\n- /Users/tlilley/projects/veatech/sbx/smithy/.yarn/cache/docsify-cli-npm-4.4.4-3d7dbcc799-2f72ff07d0.zip/node_modules/docsify-cli/lib/index.js\r\n- /Users/tlilley/projects/veatech/sbx/smithy/.yarn/cache/docsify-cli-npm-4.4.4-3d7dbcc799-2f72ff07d0.zip/node_modules/docsify-cli/bin/docsify\r\n at require$$0.Module._resolveFilename (/Users/tlilley/projects/veatech/sbx/smithy/.pnp.cjs:11795:13)\r\n at require$$0.Module._load (/Users/tlilley/projects/veatech/sbx/smithy/.pnp.cjs:11645:42)\r\n at Module.require (node:internal/modules/cjs/loader:1157:19)\r\n at require (node:internal/modules/helpers:119:18)\r\n at Object.\u003canonymous> (/Users/tlilley/projects/veatech/sbx/smithy/.yarn/cache/docsify-cli-npm-4.4.4-3d7dbcc799-2f72ff07d0.zip/node_modules/docsify-cli/lib/commands/init.js:10:16)\r\n at Module._compile (node:internal/modules/cjs/loader:1275:14)\r\n at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)\r\n at require$$0.Module._extensions..js (/Users/tlilley/projects/veatech/sbx/smithy/.pnp.cjs:11839:33)\r\n at Module.load (node:internal/modules/cjs/loader:1133:32)\r\n at require$$0.Module._load (/Users/tlilley/projects/veatech/sbx/smithy/.pnp.cjs:11676:14)\r\n\r\nNode.js v19.8.1\r\n```","author":{"url":"https://github.com/tripplilley","@type":"Person","name":"tripplilley"},"datePublished":"2023-03-20T14:05:33Z","url":"https://github.com/docsifyjs/docsify-cli/issues/191"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:96303066-ee51-cb76-ca34-2d3f977cd609 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9FA:2A130F:26DFB6C:35CB1BA:6AFD3A5B |
| html-safe-nonce | 61ca70ce9179e63d5f03eb1c3536ceda84495e70d7e9129a8b4cf9f151965d5b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUZBOjJBMTMwRjoyNkRGQjZDOjM1Q0IxQkE6NkFGRDNBNUIiLCJ2aXNpdG9yX2lkIjoiNTQ0MjAwMDgyMjEyMDc2MTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 07179c6510b8c03b9083ac53b1173865cccf42603ec6c65e07cc46539698bc9f |
| hovercard-subject-tag | issue:1632186846 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docsifyjs/docsify-cli/191/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b9e79ff69eb03b52939f0efb685befb033617ce5fa38150d0ac84fa8877927dc/docsifyjs/docsify-cli/issues/191 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b9e79ff69eb03b52939f0efb685befb033617ce5fa38150d0ac84fa8877927dc/docsifyjs/docsify-cli/issues/191 |
| og:image:alt | Yarn (v2/3) by default operates in a strict Plug'n'Play mode which does not allow directly loading indirect dependencies. lib/commands/init.js directly requires ansi-colors, but it's not listed in ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tripplilley |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/docsifyjs/docsify-cli git https://github.com/docsifyjs/docsify-cli.git |
| octolytics-dimension-user_id | 40133106 |
| octolytics-dimension-user_login | docsifyjs |
| octolytics-dimension-repository_id | 74482617 |
| octolytics-dimension-repository_nwo | docsifyjs/docsify-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 74482617 |
| octolytics-dimension-repository_network_root_nwo | docsifyjs/docsify-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width