Help with an Error in My package.json for NPM App

0
5
Asked By CuriousCat42 On

Hey folks! I'm getting an error when I try to run the 'dist' command on my project. The error message states: 'Cannot use 'in' operator to search for 'file' in undefined'. This issue doesn't occur when I run the app in development mode, but it pops up during the export to .exe. I've included my package.json for reference. Can anyone help me figure out what's going wrong?

2 Answers

Answered By CodeNinja77 On

Just a heads up, I noticed you're using 'app-builder-lib', which could be where the problem lies. If the directories in your 'files' array are correct, check if a recent update to that library has caused the issue. You could also consider rolling back to a prior version of app-builder-lib to see if that solves it. Let me know what you find!

Answered By TechGuru89 On

It looks like the error you're seeing is tied to the `in` operator, which is used to check for properties in an object. Specifically, it seems something in your app-builder-lib is receiving `undefined` when it expects an object or an array containing a `file` property. You might want to examine the 'files' array in your `build` object in package.json. Ensure the paths listed actually exist. If nothing seems wrong, try commenting out the 'build' object completely and see if that resolves the error. If it does, gradually reintroduce properties until you identify the culprit.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.