Skip to content

Can't npm install in Ubuntu 20  #183

@Smityz

Description

@Smityz

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json
rm -rf node_modules
npm install
ts-node src/main.ts
  1. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

  • What is your wechaty version?
    Answer: v0.4

  • What is your node version? (run node --version)
    Answer: v10.19.0

  • What os are you using
    Answer: Ubuntu 20.04

2. Describe the bug

npm install

> wechaty@0.38.4 postinstall /home/smilencer/Code/osschat/node_modules/wechaty
> opencollective-postinstall

Thank you for using wechaty!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/wechaty/donate


> osschat@0.4.0 postinstall /home/smilencer/Code/osschat
> sed -i 4d node_modules/@octokit/types/src/generated/Endpoints.ts

sed: can't read node_modules/@octokit/types/src/generated/Endpoints.ts: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! osschat@0.4.0 postinstall: `sed -i 4d node_modules/@octokit/types/src/generated/Endpoints.ts`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the osschat@0.4.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/smilencer/.npm/_logs/2021-10-18T03_52_07_944Z-debug.log

cat /home/smilencer/.npm/_logs/2021-10-18T03_52_07_944Z-debug.log

...
29002 silly linkStuff osschat@0.4.0 has /home/smilencer/Code as its parent node_modules
29003 silly install osschat@0.4.0
29004 info lifecycle osschat@0.4.0~install: osschat@0.4.0
29005 silly postinstall osschat@0.4.0
29006 info lifecycle osschat@0.4.0~postinstall: osschat@0.4.0
29007 verbose lifecycle osschat@0.4.0~postinstall: unsafe-perm in lifecycle true
29008 verbose lifecycle osschat@0.4.0~postinstall: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/smilencer/Code/osschat/node_modules/.bin:/home/smilencer/env/clang3.9.1/bin:/home/smilencer/env/admin-cli:/usr/lib/jvm/java-8-openjdk-amd64//bin:/home/smilencer/Code/GOPATH/bin:/home/smilencer/env/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
29009 verbose lifecycle osschat@0.4.0~postinstall: CWD: /home/smilencer/Code/osschat
29010 silly lifecycle osschat@0.4.0~postinstall: Args: [ '-c',
29010 silly lifecycle   'sed -i 4d node_modules/@octokit/types/src/generated/Endpoints.ts' ]
29011 silly lifecycle osschat@0.4.0~postinstall: Returned: code: 2  signal: null
29012 info lifecycle osschat@0.4.0~postinstall: Failed to exec postinstall script
29013 verbose stack Error: osschat@0.4.0 postinstall: `sed -i 4d node_modules/@octokit/types/src/generated/Endpoints.ts`
29013 verbose stack Exit status 2
29013 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
29013 verbose stack     at EventEmitter.emit (events.js:198:13)
29013 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
29013 verbose stack     at ChildProcess.emit (events.js:198:13)
29013 verbose stack     at maybeClose (internal/child_process.js:982:16)
29013 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
29014 verbose pkgid osschat@0.4.0
29015 verbose cwd /home/smilencer/Code/osschat
29016 verbose Linux 5.11.0-37-generic
29017 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
29018 verbose node v10.19.0
29019 verbose npm  v6.14.4
29020 error code ELIFECYCLE
29021 error errno 2
29022 error osschat@0.4.0 postinstall: `sed -i 4d node_modules/@octokit/types/src/generated/Endpoints.ts`
29022 error Exit status 2
29023 error Failed at the osschat@0.4.0 postinstall script.
29023 error This is probably not a problem with npm. There is likely additional logging output above.
29024 verbose exit [ 2, true ]

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. run '...'
  2. ...
  3. ...

4. Expected behavior

Give a clear and concise description of what you expected to happen.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs
$ WECHATY_LOG=silly ts-node src/main.ts

Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages
Answer:

7. Additional context

Add any other context about the problem here.

[bug]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions