Skip to content

Commit e55ea98

Browse files
committed
fix(importer): warn if the package.json being imported does not have a version
1 parent 69b2995 commit e55ea98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/api/import.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ export default async (providedOptions = {}) => {
184184

185185
packageJSON = await readPackageJSON(dir);
186186

187+
if (!packageJSON.version) {
188+
warn(interactive, "Please set the 'version' in your application's package.json".yellow);
189+
}
190+
187191
packageJSON.config = packageJSON.config || {};
188192
const templatePackageJSON = await readPackageJSON(path.resolve(__dirname, '../../tmpl'));
189193
packageJSON.config.forge = templatePackageJSON.config.forge;

0 commit comments

Comments
 (0)