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

import 引入报错 #23

Closed
yyhuaisha opened this issue Aug 22, 2019 · 6 comments
Closed

import 引入报错 #23

yyhuaisha opened this issue Aug 22, 2019 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@yyhuaisha
Copy link

错误信息如下:
ERROR in ./node_modules/bplist-parser/bplistParser.js
Module not found: Error: Can't resolve 'fs' in 'E:\dev\youdu_back_end\node_modules\bplist-parser'
ERROR in ./node_modules/app-info-parser/src/zip.js
Module not found: Error: Can't resolve 'path' in 'E:\dev\youdu_back_end\node_modules\app-info-parser\src'
ERROR in ./node_modules/streamifier/lib/index.js
Module not found: Error: Can't resolve 'stream' in 'E:\dev\youdu_back_end\node_modules\streamifier\lib'
ERROR in ./node_modules/cgbi-to-png/index.js
Module not found: Error: Can't resolve 'zlib' in 'E:\dev\youdu_back_end\node_modules\cgbi-to-png'

image

@chenquincy
Copy link
Owner

@yyhuaisha Add the follow configuration to your webpack.config.js:

node: {
  fs: 'empty'
}

@chenquincy chenquincy added the question Further information is requested label Aug 23, 2019
@dreamersss
Copy link

我用angular写的,也出现上面的问题,怎么办

@chenquincy
Copy link
Owner

chenquincy commented Sep 25, 2019

@dreamersss angular使用内置的 webpack-cli 处理,所以没办法直接修改。稍后会修复这个问题

@chenquincy
Copy link
Owner

@dreamersss 问题已修复,你用最新的 0.3.4 版本试试

@dreamersss
Copy link

fs解决了,剩下的三个path,stream,zlib还是报错

@chenquincy
Copy link
Owner

@dreamersss 我这边似乎没什么问题,angular我不怎么用,建议你可以选择引入 dist/app-info-parser.min.js

<script src="<your path>/app-info-parser.min.js">

使用的话直接使用 new AppInfoParser 即可

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

No branches or pull requests

3 participants