Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cannot find module 'tslint/lib/error' #3209

Closed
Symous opened this issue May 28, 2019 · 4 comments
Closed

Cannot find module 'tslint/lib/error' #3209

Symous opened this issue May 28, 2019 · 4 comments
Assignees

Comments

@Symous
Copy link

Symous commented May 28, 2019

问题描述
新建的项目,运行yarn dev:rn报错:Cannot find module 'tslint/lib/error'
复现步骤

  1. 创建项目
  2. yarn dev:rn

期望行为
正常运行
报错信息

$ yarn dev:rn
yarn dev:rn v0.24.6
$ npm run build:rn -- --watch 

> taro-msparis@1.0.0 build:rn /Users/symous/Desktop/LearningProj/taro-msparis
> taro build --type rn "--watch"

👽 Taro v1.3.0-beta.5

开始编译项目 taro-msparis
internal/modules/cjs/loader.js:605
    throw err;
    ^

Error: Cannot find module 'tslint/lib/error'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@tarojs/cli/dist/rn.js:26:17)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! taro-msparis@1.0.0 build:rn: `taro build --type rn "--watch"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the taro-msparis@1.0.0 build:rn 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!     /Users/symous/.npm/_logs/2019-05-28T06_27_03_568Z-debug.log
error Command failed with exit code 1.

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

  • 操作系统: macOS 10.14.4
  • Taro 版本: 1.2.2
  • Node.js 版本: 11.2.0
  • 报错平台: rn
@Pines-Cheng
Copy link
Contributor

已修复 a4358f7,等下个版本发布。

临时解决方案:ls -al $(which taro) 可以得到 CLI 全局的安装目录,然后安装 tslint 依赖就可以了。

@taro-bot
Copy link

taro-bot bot commented May 28, 2019

CC @Pines-Cheng

@xiongjy2104
Copy link

遇到同样问题,希望尽快发版

@Pines-Cheng
Copy link
Contributor

beta6 已发。

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

No branches or pull requests

3 participants