[英]I've created an extension, but when loaded can't find a dependency
I've created an extension for VSCode which generated barrel files for Dart and Flutter projects.我为 VSCode 创建了一个扩展,它为 Dart 和 Flutter 项目生成桶文件。
I've used Javascript and I've used the package loadash
.我用过 Javascript 和 package
loadash
。 However, now that I have installed it, I keep getting the error: Cannot find module 'lodash'
.但是,现在我已经安装了它,我不断收到错误:
Cannot find module 'lodash'
。
I've been looking around and I do not know how to fix it, since I would not want that all users should install the loadash
dependency.我一直在环顾四周,但我不知道如何解决它,因为我不希望所有用户都安装
loadash
依赖项。 Aren't dependecies added when created the extension package with vsce package
?使用
vsce package
创建扩展 package 时是否添加了依赖项?
I solved it by removing the node_modules/**
line from the .vscodeignore
file.我通过从
.vscodeignore
文件中删除node_modules/**
行来解决它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.