final-form / final-form/react-final-form
Undeclared dependency "lodash" is called on "npm run validate"
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
When using sandboxed environment like nix or yarn-berry (yarn3), undeclared dependencies will throw an error.
https://github.com/final-form/react-final-form/blob/cf64402a407ee08264c2348a035ddb718a058082/src/getValue.test.js#L1
### What is the current behavior?
```
> react-final-form@6.5.3 prepublish
> npm start validate
> react-final-form@6.5.3 start
> nps "validate"
node:internal/modules/cjs/loader:927
throw err;
^
Error: Cannot find module 'lodash'
Require stack:
- /nix/store/cyl4i345g7gvrc84397fj3cq8kdf9vzv-node_react-final-form-6.5.3/lib/node_modules/react-final-form/node_modules/nps/dist/bin/nps.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object. (/nix/store/cyl4i345g7gvrc84397fj3cq8kdf9vzv-node_react-final-form-6.5.3/lib/node_modules/react-final-form/node_modules/nps/dist/bin/nps.js
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
code: 'MODULE_NOT_FOUND',
```
### What is the expected behavior?
lodash is added into dependencies (not devDependencies!)
### Sandbox Link
### What's your environment?
macbook pro, nodejs 15, react-final-form@6.5.3
### Other information
Contributor guide
Assessment
This issue has not been assessed yet.