【问题标题】:Any packages I install the others are removed我安装其他的任何软件包都被删除
【发布时间】:2018-03-31 02:07:24
【问题描述】:

环境

  OS: Linux 4.14
  Node: 8.10.0
  Yarn: 1.5.1
  npm: 5.6.0
  Watchman: Not Found
  Xcode: N/A
  Android Studio: Not Found

Packages: (wanted => installed)
  react: ^16.3.0-alpha.1 => 16.3.0-rc.0
  react-native: 0.54.3 => 0.54.3

复制步骤

我安装的所有软件包都被删除了

预期行为

工作正常

实际行为

npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/.bin/jsesc as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/jsesc
        npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/.bin/esparse as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/esprima
        npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/.bin/esvalidate as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/esprima
        npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/.bin/babylon as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/babylon
        npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/@babel/traverse/node_modules/.bin/babylon as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/@babel/traverse/node_modules/babylon
        npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/@babel/template/node_modules/.bin/babylon as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/@babel/template/node_modules/babylon
        npm WARN rm not removing /home/rodrigo/Documentos/React-Native/app12/node_modules/@babel/core/node_modules/.bin/babylon as it wasn't installed by /home/rodrigo/Documentos/React-Native/app12/node_modules/@babel/core/node_modules/babylon
        npm notice created a lockfile as package-lock.json. You should commit this file.
        + redux@3.7.2
        added 3 packages, removed 937 packages and updated 3 packages in 5.856s

然后,如果我尝试启动应用程序:

npm start

> app12@0.0.1 start /home/rodrigo/Documentos/React-Native/app12
> node node_modules/react-native/local-cli/cli.js start

module.js:549
    throw err;
    ^

Error: Cannot find module '.../React-Native/app12/node_modules/react-native/local-cli/cli.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app12@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the app12@0.0.1 start 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!     /tmp/pamac-build-rodrigo/popcorntime/src/npm_cache/_logs/2018-03-29T03_36_10_420Z-debug.log

昨天一切正常,但现在我遇到了这些问题。我不记得从 react-native 改变了什么。

谁能帮帮我?

【问题讨论】:

标签: react-native npm-install


【解决方案1】:

我已经通过使用 yarn 而不是 npm “修复”了这个问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-12
    • 2020-05-19
    • 1970-01-01
    • 1970-01-01
    • 2019-03-19
    • 2019-06-21
    • 1970-01-01
    • 2021-08-30
    相关资源
    最近更新 更多