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

Error: Cannot find module '../transformation/file' #1721

Closed
chenlong-io opened this issue Dec 27, 2018 · 7 comments
Closed

Error: Cannot find module '../transformation/file' #1721

chenlong-io opened this issue Dec 27, 2018 · 7 comments
Assignees

Comments

@chenlong-io
Copy link

问题描述
npm run dev:weapp后编译报错: Error: Cannot find module '../transformation/file'

{ Error: Cannot find module '../transformation/file'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/Mac/web/ejia/weapp/packages/events_2019/node_modules/babel-core/lib/api/node.js:6:13)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3) code: 'MODULE_NOT_FOUND' }

package.json

"dependencies": {
    "@tarojs/async-await": "^1.2.2",
    "@tarojs/components": "^1.2.1",
    "@tarojs/mobx": "^1.2.1",
    "@tarojs/mobx-h5": "^1.2.1",
    "@tarojs/mobx-prop-types": "^1.2.2",
    "@tarojs/mobx-rn": "^1.2.1",
    "@tarojs/rn-runner": "^1.2.1",
    "@tarojs/router": "^1.2.1",
    "@tarojs/taro": "^1.2.1",
    "@tarojs/taro-alipay": "^1.2.1",
    "@tarojs/taro-h5": "^1.2.1",
    "@tarojs/taro-swan": "^1.2.1",
    "@tarojs/taro-tt": "^1.2.1",
    "@tarojs/taro-weapp": "^1.2.1",
    "mobx": "^5.5.2",
    "nerv-devtools": "^1.3.9",
    "nervjs": "^1.3.9"
  },
  "devDependencies": {
    "@tarojs/plugin-babel": "^1.2.2",
    "@tarojs/plugin-csso": "^1.2.1",
    "@tarojs/plugin-less": "^1.2.1",
    "@tarojs/plugin-uglifyjs": "^1.2.1",
    "@tarojs/webpack-runner": "^1.2.1",
    "@types/react": "16.3.14",
    "@types/webpack-env": "^1.13.6",
    "babel-eslint": "^8.2.3",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-jsx-stylesheet": "^0.6.5",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "eslint": "^4.19.1",
    "eslint-config-taro": "^1.2.1",
    "eslint-plugin-import": "^2.12.0",
    "eslint-plugin-react": "^7.8.2",
    "eslint-plugin-taro": "^1.2.1",
    "typescript": "^3.0.1"
  }

报错信息
wx20181227-143415 2x

系统信息

  • 操作系统: macOS 10.14
  • Taro 版本 Taro v1.2.1
  • Node.js 版本 v8.9.0
  • 报错平台 weapp
@taro-bot
Copy link

taro-bot bot commented Dec 27, 2018

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@chenlong-io
Copy link
Author

找到原因了,是因为安装了@tarojs/mobx-prop-types,但是如何解决呢?

@luckyadam luckyadam added the mobx label Dec 27, 2018
@luckyadam luckyadam self-assigned this Dec 27, 2018
@nanjingboy
Copy link
Member

@vibing 我尝试了下,跟 @tarojs/mobx-prop-types 无关的。

@nanjingboy
Copy link
Member

@luckyadam 信息量太少,无法排查

@Tingglelaoo
Copy link

Tingglelaoo commented May 27, 2019

找到原因了,是因为安装了@tarojs/mobx-prop-types,但是如何解决呢?

@vibing 我也遇到相同的问题了,是watchman版本过旧的问题。

Error: watchman 4.6.0 is already installed
To upgrade to 4.9.0_2, run `brew upgrade watchman`.

可以运行下 brew upgrade watchman看看

@chenlong-io
Copy link
Author

@Tingglelaoo 好的 谢谢

@yqwoe
Copy link

yqwoe commented Jun 8, 2020

watchman 4.9.0_3 依然有这个问题

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

5 participants