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

Cannot convert undefined or null to object if there are no dependencies #81

Open
nullnullend opened this issue Jul 20, 2022 · 4 comments

Comments

@nullnullend
Copy link

I have a monorepository where some child package.json is missing dependencies.

{
  "name": "@project/client",
  "version": "1.0.9",
  "private": true,
  "scripts": {
    "start": "cross-env BROWSER=none PORT=3200 craco start",
    "build": "cross-env craco build",
  }
}

I get this error:

E:\project\node_modules\react-app-alias-ex\src\index.js:58
  const list = [].concat(...depsSections.map(s => Object.keys(pack[s])))

TypeError: Cannot convert undefined or null to object
@oklas
Copy link
Owner

oklas commented Jul 20, 2022

Can you make a PR?

@nullnullend
Copy link
Author

I can create, correct a mistake. But the problem is actually bigger than that. With this structure, the list of dependencies is not correct. They are in the root package.json file.

@oklas
Copy link
Owner

oklas commented Jul 23, 2022 via email

@oklas
Copy link
Owner

oklas commented Oct 11, 2022 via email

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