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

compilation.templatesPlugin is not a function #101

Closed
442627268 opened this issue Nov 5, 2019 · 1 comment
Closed

compilation.templatesPlugin is not a function #101

442627268 opened this issue Nov 5, 2019 · 1 comment
Assignees

Comments

@442627268
Copy link

用npm install后 npm run serve启动报如下错误
image
的解决方案如下:
1.删除node_modules 用cnpm安装是一种解决方法。
2.删除node_modules 用npm add webpack@latest安装依赖也能启动。
原因是:因为你的webpack不是最新版本,但是install去下载也不是最新,所以这里我们要手动下载

@ly525
Copy link
Owner

ly525 commented Nov 5, 2019

我们为何不推荐使用npm 或 cnpm 的原因参见 #92,因为我们使用了 yarn.lock 来保证安装依赖的一致性。以及部署在heroku 上的时候,其文档提及只能拥有一个lock 文件,我们也有考虑到这方面的兼容问题

另外,我们发现可以使用 preinstall 来检查用户使用的是 npm 还是 yarn,从而做更好的包管理。

当然如果你可以用cnpm 解决也是可以的。

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

2 participants