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

打包就报错 #12

Open
fergusding opened this issue Aug 5, 2016 · 14 comments
Open

打包就报错 #12

fergusding opened this issue Aug 5, 2016 · 14 comments

Comments

@fergusding
Copy link

Cannot find module 'node-haste/lib/DependencyGraph/docblock.js' 这个是因为喔安装出错了吗,少文件了吗?

@zhangpoor
Copy link

我也是遇到这个问题。 运行代码和返回信息如下:

$ moles-packer --entry index.ios.js
[MOLES_PACKER] -- Process common bundle --
module.js:442
throw err;
^

Error: Cannot find module 'node-haste/lib/DependencyGraph/docblock.js'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at _create_common (/usr/local/lib/node_modules/moles-packer/lib/packCommon.js:35:20)
at _ME (/usr/local/lib/node_modules/moles-packer/lib/packCommon.js:265:24)
at _ME (/usr/local/lib/node_modules/moles-packer/lib/pack.js:22:22)
at Object. (/usr/local/lib/node_modules/moles-packer/bin/pack.js:4:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)

@fergusding
Copy link
Author

@zhangpoor 这个问题你解决了吗?

@zlx0212
Copy link

zlx0212 commented Sep 21, 2016

试试:npm install -g node-haste

@fergusding
Copy link
Author

fergusding commented Sep 21, 2016

已解决。 全局安装了node-haste也会有后续问题,比如es5的有个插件找不到,因此我是安装在了开发环境。

@zlx0212
Copy link

zlx0212 commented Sep 21, 2016

我安装在开发环境下面一直还是提示“Cannot find module 'node-haste/lib/DependencyGraph/docblock.js'”,全局安装的确又遇到es5的问题。有办法吗?

@fergusding
Copy link
Author

开发环境下安装 执行node_modules/.bin/moles-packer命令。全局安装需要先安装node-haste,然后它会在moles-packer打包的base路径下找es5,所以确定你的base路径是在项目目录下并且在开发环境下安装moles-packer,因为moles-packer会有许多依赖库,es5就是其中之一。

@zlx0212
Copy link

zlx0212 commented Sep 21, 2016

按你的要求先执行“npm install -g node-haste”,之后执行的“npm install -g moles-packer”,但是执行“moles-packer
--input ./
--entry index.ios.js
--output ./build
--bundle bu.jsbundle
--common true”
的时候还是提示“ReferenceError: Unknown plugin "transform-es5-property-mutators" specified in "base" at 0,。。。”

@zlx0212
Copy link

zlx0212 commented Sep 21, 2016

“所以确定你的base路径是在项目目录下”---你说的base路径是指的哪个路径啊?

@fergusding
Copy link
Author

其实我的意思是 你要运行全局的moles-packer也需要 在你的项目下将moles-packer在开发环境下再安装一次 它会去你的项目中的node_modules中去找transform-es5-property-mutators这个插件 所谓base其实就是运行打包命令的位置,所以你尽量在项目路径下运行打包命令。

@zlx0212
Copy link

zlx0212 commented Sep 21, 2016

有没有交流群啊,我要寻求组织

@fergusding
Copy link
Author

貌似没有 不过作者说这周开始可能会重新开始维护这个项目 这些问题后面应该都能解决~

@zlx0212
Copy link

zlx0212 commented Sep 21, 2016

你qq多少?

@fergusding
Copy link
Author

看git主页

@laowenlu
Copy link

@zlx0212 你解决这个问题没有呢, 我也是卡在这里了

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

4 participants