Skip to content

Failed to install Docsify-cli #96

New issue

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

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

Already on GitHub? # to your account

Closed
phuongbag opened this issue Mar 4, 2020 · 3 comments
Closed

Failed to install Docsify-cli #96

phuongbag opened this issue Mar 4, 2020 · 3 comments

Comments

@phuongbag
Copy link

phuongbag commented Mar 4, 2020

npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! docsify@4.10.2 postinstall: `opencollective-postinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the docsify@4.10.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm version: 6.13.7
node version: v13.9.0
nodejs version: v8.10.0

Problem: Cant run "npm i docsify-cli -g" to install. BUT i use "sudo npm i docsify-cli -g", i am able to install. problem is I cant use docsify command. it will output.

/usr/bin/env: ‘node\r’: No such file or directory
root@ac-switchvn:~# cd
root@ac-switchvn:~# docsify
/usr/bin/env: ‘node\r’: No such file or directory
▄ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine docsify-cli@4.4.0: wanted: {"node":">= 8","npm":">= 5"} (current: {"loadRequestedDeps         ▐ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine docsify-cli@4.4.0: wanted: {"node":">= 8","npm":">= 5"} (current: {"/usr/local/bin/docsify -> /usr/local/lib/node_modules/docsify-cli/bin/docsify
npm WARN lifecycle docsify@4.10.2~postinstall: cannot run in wd %s %s (wd=%s) docsify@4.10.2 opencollective-postinstall /usr/local/lib/node_modules/docsify-cli/node_modules/docsify
/usr/local/lib
└─┬ docsify-cli@4.4.0
  ├─┬ chalk@2.4.2
  │ ├─┬ ansi-styles@3.2.1
  │ │ └─┬ color-convert@1.9.3
  │ │   └── color-name@1.1.3
  │ ├── escape-string-regexp@1.0.5
  │ └─┬ supports-color@5.5.0
  │   └── has-flag@3.0.0
  ├─┬ connect@3.7.0
  │ ├─┬ debug@2.6.9
  │ │ └── ms@2.0.0
  │ ├─┬ finalhandler@1.1.2
  │ │ ├─┬ on-finished@2.3.0
  │ │ │ └── ee-first@1.1.1
  │ │ ├── statuses@1.5.0
  │ │ └── unpipe@1.0.0
  │ ├── parseurl@1.3.3
  │ └── utils-merge@1.0.1
  ├── connect-livereload@0.6.1
  ├─┬ cp-file@7.0.0
  │ ├── graceful-fs@4.2.3
  │ ├─┬ make-dir@3.0.2
  │ │ └── semver@6.3.0
  │ ├── nested-error-stacks@2.1.0
  │ └─┬ p-event@4.1.0
  │   └─┬ p-timeout@2.0.1
  │     └── p-finally@1.0.0
  ├─┬ docsify@4.10.2
  │ ├── marked@0.7.0
  │ ├── medium-zoom@1.0.5
  │ ├── opencollective-postinstall@2.0.2
  │ ├─┬ prismjs@1.19.0
  │ │ └─┬ clipboard@2.0.5
  │ │   ├─┬ good-listener@1.2.2
  │ │   │ └── delegate@3.2.0
  │ │   ├── select@1.1.2
  │ │   └── tiny-emitter@2.1.0
  │ ├── tinydate@1.2.0
  │ └── tweezer.js@1.5.0
  ├─┬ docsify-server-renderer@4.10.2
  │ ├─┬ debug@4.1.1
  │ │ └── ms@2.1.2
  │ ├── node-fetch@2.6.0
  │ └── resolve-pathname@3.0.0
  ├─┬ fs-extra@8.1.0
  │ ├── jsonfile@4.0.0
  │ └── universalify@0.1.2
  ├── get-port@5.1.1
  ├─┬ livereload@0.8.2
  │ ├─┬ chokidar@2.1.8
  │ │ ├─┬ anymatch@2.0.0
  │ │ │ ├─┬ micromatch@3.1.10
  │ │ │ │ ├── arr-diff@4.0.0
  │ │ │ │ ├─┬ define-property@2.0.2
  │ │ │ │ │ └─┬ is-descriptor@1.0.2
  │ │ │ │ │   ├── is-accessor-descriptor@1.0.0
  │ │ │ │ │   └── is-data-descriptor@1.0.0
  │ │ │ │ ├─┬ extend-shallow@3.0.2
  │ │ │ │ │ ├── assign-symbols@1.0.0
  │ │ │ │ │ └─┬ is-extendable@1.0.1
  │ │ │ │ │   └── is-plain-object@2.0.4
  │ │ │ │ ├─┬ extglob@2.0.4
  │ │ │ │ │ ├─┬ define-property@1.0.0
  │ │ │ │ │ │ └─┬ is-descriptor@1.0.2
  │ │ │ │ │ │   ├── is-accessor-descriptor@1.0.0
  │ │ │ │ │ │   └── is-data-descriptor@1.0.0
  │ │ │ │ │ ├─┬ expand-brackets@2.1.4
  │ │ │ │ │ │ ├── define-property@0.2.5
  │ │ │ │ │ │ ├── extend-shallow@2.0.1
  │ │ │ │ │ │ └── posix-character-classes@0.1.1
  │ │ │ │ │ └── extend-shallow@2.0.1
  │ │ │ │ ├── fragment-cache@0.2.1
  │ │ │ │ ├── kind-of@6.0.3
  │ │ │ │ ├─┬ nanomatch@1.2.13
  │ │ │ │ │ └── is-windows@1.0.2
  │ │ │ │ ├── object.pick@1.3.0
  │ │ │ │ └── regex-not@1.0.2
  │ │ │ └─┬ normalize-path@2.1.1
  │ │ │   └── remove-trailing-separator@1.1.0
  │ │ ├── async-each@1.0.3
  │ │ ├─┬ braces@2.3.2
  │ │ │ ├── arr-flatten@1.1.0
  │ │ │ ├── array-unique@0.3.2
  │ │ │ ├─┬ extend-shallow@2.0.1
  │ │ │ │ └── is-extendable@0.1.1
  │ │ │ ├─┬ fill-range@4.0.0
  │ │ │ │ ├── extend-shallow@2.0.1
  │ │ │ │ ├─┬ is-number@3.0.0
  │ │ │ │ │ └─┬ kind-of@3.2.2
  │ │ │ │ │   └── is-buffer@1.1.6
  │ │ │ │ ├── repeat-string@1.6.1
  │ │ │ │ └── to-regex-range@2.1.1
  │ │ │ ├── isobject@3.0.1
  │ │ │ ├── repeat-element@1.1.3
  │ │ │ ├─┬ snapdragon@0.8.2
  │ │ │ │ ├─┬ base@0.11.2
  │ │ │ │ │ ├─┬ cache-base@1.0.1
  │ │ │ │ │ │ ├─┬ collection-visit@1.0.0
  │ │ │ │ │ │ │ ├── map-visit@1.0.0
  │ │ │ │ │ │ │ └── object-visit@1.0.1
  │ │ │ │ │ │ ├── get-value@2.0.6
  │ │ │ │ │ │ ├─┬ has-value@1.0.0
  │ │ │ │ │ │ │ └─┬ has-values@1.0.0
  │ │ │ │ │ │ │   └── kind-of@4.0.0
  │ │ │ │ │ │ ├─┬ set-value@2.0.1
  │ │ │ │ │ │ │ └── extend-shallow@2.0.1
  │ │ │ │ │ │ ├─┬ to-object-path@0.3.0
  │ │ │ │ │ │ │ └── kind-of@3.2.2
  │ │ │ │ │ │ ├── union-value@1.0.1
  │ │ │ │ │ │ └─┬ unset-value@1.0.0
  │ │ │ │ │ │   └─┬ has-value@0.3.1
  │ │ │ │ │ │     ├── has-values@0.1.4
  │ │ │ │ │ │     └── isobject@2.1.0
  │ │ │ │ │ ├─┬ class-utils@0.3.6
  │ │ │ │ │ │ ├── arr-union@3.1.0
  │ │ │ │ │ │ ├── define-property@0.2.5
  │ │ │ │ │ │ └─┬ static-extend@0.1.2
  │ │ │ │ │ │   ├── define-property@0.2.5
  │ │ │ │ │ │   └─┬ object-copy@0.1.0
  │ │ │ │ │ │     ├── copy-descriptor@0.1.1
  │ │ │ │ │ │     ├── define-property@0.2.5
  │ │ │ │ │ │     └── kind-of@3.2.2
  │ │ │ │ │ ├── component-emitter@1.3.0
  │ │ │ │ │ ├─┬ define-property@1.0.0
  │ │ │ │ │ │ └─┬ is-descriptor@1.0.2
  │ │ │ │ │ │   ├── is-accessor-descriptor@1.0.0
  │ │ │ │ │ │   └── is-data-descriptor@1.0.0
  │ │ │ │ │ ├─┬ mixin-deep@1.3.2
  │ │ │ │ │ │ ├── for-in@1.0.2
  │ │ │ │ │ │ └── is-extendable@1.0.1
  │ │ │ │ │ └── pascalcase@0.1.1
  │ │ │ │ ├─┬ define-property@0.2.5
  │ │ │ │ │ └─┬ is-descriptor@0.1.6
  │ │ │ │ │   ├─┬ is-accessor-descriptor@0.1.6
  │ │ │ │ │   │ └── kind-of@3.2.2
  │ │ │ │ │   ├─┬ is-data-descriptor@0.1.4
  │ │ │ │ │   │ └── kind-of@3.2.2
  │ │ │ │ │   └── kind-of@5.1.0
  │ │ │ │ ├── extend-shallow@2.0.1
  │ │ │ │ ├── map-cache@0.2.2
  │ │ │ │ ├── source-map@0.5.7
  │ │ │ │ ├─┬ source-map-resolve@0.5.3
  │ │ │ │ │ ├── atob@2.1.2
  │ │ │ │ │ ├── decode-uri-component@0.2.0
  │ │ │ │ │ ├── resolve-url@0.2.1
  │ │ │ │ │ ├── source-map-url@0.4.0
  │ │ │ │ │ └── urix@0.1.0
  │ │ │ │ └── use@3.1.1
  │ │ │ ├─┬ snapdragon-node@2.1.1
  │ │ │ │ ├─┬ define-property@1.0.0
  │ │ │ │ │ └─┬ is-descriptor@1.0.2
  │ │ │ │ │   ├── is-accessor-descriptor@1.0.0
  │ │ │ │ │   └── is-data-descriptor@1.0.0
  │ │ │ │ └─┬ snapdragon-util@3.0.1
  │ │ │ │   └── kind-of@3.2.2
  │ │ │ ├── split-string@3.1.0
  │ │ │ └─┬ to-regex@3.0.2
  │ │ │   └─┬ safe-regex@1.1.0
  │ │ │     └── ret@0.1.15
  │ │ ├─┬ glob-parent@3.1.0
  │ │ │ ├── is-glob@3.1.0
  │ │ │ └── path-dirname@1.0.2
  │ │ ├── inherits@2.0.4
  │ │ ├─┬ is-binary-path@1.0.1
  │ │ │ └── binary-extensions@1.13.1
  │ │ ├─┬ is-glob@4.0.1
  │ │ │ └── is-extglob@2.1.1
  │ │ ├── normalize-path@3.0.0
  │ │ ├── path-is-absolute@1.0.1
  │ │ ├─┬ readdirp@2.2.1
  │ │ │ └─┬ readable-stream@2.3.7
  │ │ │   ├── core-util-is@1.0.2
  │ │ │   ├── isarray@1.0.0
  │ │ │   ├── process-nextick-args@2.0.1
  │ │ │   ├── safe-buffer@5.1.2
  │ │ │   ├── string_decoder@1.1.1
  │ │ │   └── util-deprecate@1.0.2
  │ │ └── upath@1.2.0
  │ ├── opts@1.2.7
  │ └─┬ ws@6.2.1
  │   └── async-limiter@1.0.1
  ├─┬ lru-cache@5.1.1
  │ └── yallist@3.1.1
  ├─┬ open@6.4.0
  │ └── is-wsl@1.1.0
  ├─┬ serve-static@1.14.1
  │ ├── encodeurl@1.0.2
  │ ├── escape-html@1.0.3
  │ └─┬ send@0.17.1
  │   ├── depd@1.1.2
  │   ├── destroy@1.0.4
  │   ├── etag@1.8.1
  │   ├── fresh@0.5.2
  │   ├─┬ http-errors@1.7.3
  │   │ ├── setprototypeof@1.1.1
  │   │ └── toidentifier@1.0.0
  │   ├── mime@1.6.0
  │   ├── ms@2.1.1
  │   └── range-parser@1.2.1
  ├─┬ update-notifier@3.0.1
  │ ├─┬ boxen@3.2.0
  │ │ ├── ansi-align@3.0.0
  │ │ ├── camelcase@5.3.1
  │ │ ├── cli-boxes@2.2.0
  │ │ ├─┬ term-size@1.2.0
  │ │ │ └─┬ execa@0.7.0
  │ │ │   ├─┬ cross-spawn@5.1.0
  │ │ │   │ ├─┬ lru-cache@4.1.5
  │ │ │   │ │ ├── pseudomap@1.0.2
  │ │ │   │ │ └── yallist@2.1.2
  │ │ │   │ ├─┬ shebang-command@1.2.0
  │ │ │   │ │ └── shebang-regex@1.0.0
  │ │ │   │ └─┬ which@1.3.1
  │ │ │   │   └── isexe@2.0.0
  │ │ │   ├── get-stream@3.0.0
  │ │ │   ├── is-stream@1.1.0
  │ │ │   ├─┬ npm-run-path@2.0.2
  │ │ │   │ └── path-key@2.0.1
  │ │ │   └── strip-eof@1.0.0
  │ │ ├── type-fest@0.3.1
  │ │ └─┬ widest-line@2.0.1
  │ │   └─┬ string-width@2.1.1
  │ │     └─┬ strip-ansi@4.0.0
  │ │       └── ansi-regex@3.0.0
  │ ├─┬ configstore@4.0.0
  │ │ ├─┬ dot-prop@4.2.0
  │ │ │ └── is-obj@1.0.1
  │ │ ├─┬ make-dir@1.3.0
  │ │ │ └── pify@3.0.0
  │ │ ├─┬ unique-string@1.0.0
  │ │ │ └── crypto-random-string@1.0.0
  │ │ └─┬ write-file-atomic@2.4.3
  │ │   ├── imurmurhash@0.1.4
  │ │   └── signal-exit@3.0.2
  │ ├── has-yarn@2.1.0
  │ ├── import-lazy@2.1.0
  │ ├─┬ is-ci@2.0.0
  │ │ └── ci-info@2.0.0
  │ ├─┬ is-installed-globally@0.1.0
  │ │ ├─┬ global-dirs@0.1.1
  │ │ │ └── ini@1.3.5
  │ │ └─┬ is-path-inside@1.0.1
  │ │   └── path-is-inside@1.0.2
  │ ├── is-npm@3.0.0
  │ ├── is-yarn-global@0.3.0
  │ ├─┬ latest-version@5.1.0
  │ │ └─┬ package-json@6.5.0
  │ │   ├─┬ got@9.6.0
  │ │   │ ├── @sindresorhus/is@0.14.0
  │ │   │ ├─┬ @szmarczak/http-timer@1.1.2
  │ │   │ │ └── defer-to-connect@1.1.3
  │ │   │ ├─┬ cacheable-request@6.1.0
  │ │   │ │ ├── clone-response@1.0.2
  │ │   │ │ ├── get-stream@5.1.0
  │ │   │ │ ├── http-cache-semantics@4.1.0
  │ │   │ │ ├─┬ keyv@3.1.0
  │ │   │ │ │ └── json-buffer@3.0.0
  │ │   │ │ ├── lowercase-keys@2.0.0
  │ │   │ │ ├── normalize-url@4.5.0
  │ │   │ │ └── responselike@1.0.2
  │ │   │ ├── decompress-response@3.3.0
  │ │   │ ├── duplexer3@0.1.4
  │ │   │ ├─┬ get-stream@4.1.0
  │ │   │ │ └─┬ pump@3.0.0
  │ │   │ │   ├── end-of-stream@1.4.4
  │ │   │ │   └─┬ once@1.4.0
  │ │   │ │     └── wrappy@1.0.2
  │ │   │ ├── lowercase-keys@1.0.1
  │ │   │ ├── mimic-response@1.0.1
  │ │   │ ├── p-cancelable@1.1.0
  │ │   │ ├── to-readable-stream@1.0.0
  │ │   │ └─┬ url-parse-lax@3.0.0
  │ │   │   └── prepend-http@2.0.0
  │ │   ├─┬ registry-auth-token@4.1.1
  │ │   │ └─┬ rc@1.2.8
  │ │   │   ├── deep-extend@0.6.0
  │ │   │   ├── minimist@1.2.0
  │ │   │   └── strip-json-comments@2.0.1
  │ │   └── registry-url@5.1.0
  │ ├─┬ semver-diff@2.1.0
  │ │ └── semver@5.7.1
  │ └── xdg-basedir@3.0.0
  ├─┬ yargonaut@1.1.4
  │ ├─┬ chalk@1.1.3
  │ │ ├── ansi-styles@2.2.1
  │ │ ├─┬ has-ansi@2.0.0
  │ │ │ └── ansi-regex@2.1.1
  │ │ ├─┬ strip-ansi@3.0.1
  │ │ │ └── ansi-regex@2.1.1
  │ │ └── supports-color@2.0.0
  │ ├── figlet@1.3.0
  │ └── parent-require@1.0.0
  └─┬ yargs@14.2.2
    ├─┬ cliui@5.0.0
    │ ├─┬ strip-ansi@5.2.0
    │ │ └── ansi-regex@4.1.0
    │ └── wrap-ansi@5.1.0
    ├── decamelize@1.2.0
    ├─┬ find-up@3.0.0
    │ └─┬ locate-path@3.0.0
    │   ├─┬ p-locate@3.0.0
    │   │ └─┬ p-limit@2.2.2
    │   │   └── p-try@2.2.0
    │   └── path-exists@3.0.0
    ├── get-caller-file@2.0.5
    ├── require-directory@2.1.1
    ├── require-main-filename@2.0.0
    ├── set-blocking@2.0.0
    ├─┬ string-width@3.1.0
    │ ├── emoji-regex@7.0.3
    │ └── is-fullwidth-code-point@2.0.0
    ├── which-module@2.0.0
    ├── y18n@4.0.0
    └── yargs-parser@15.0.0

npm WARN optional Skipping failed optional dependency /docsify-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.11
@phuongbag
Copy link
Author

phuongbag commented Mar 4, 2020

Doing

sudo apt install dos2unix
sudo dos2unix /usr/local/lib/node_modules/docsify-cli/bin/docsify

Fixe it for me.
Thx @nsainaney

This helped me! #78 and comment link

@anikethsaha
Copy link
Member

Ok we need to add opencollective-postinstall in dep to fix it.

@sy-records
Copy link
Member

This should be fixed, if it still exists, please reopen.

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

No branches or pull requests

3 participants