简体   繁体   中英

Heroku not installing certain Node modules

I'm trying deploy a Lerna app on Heroku, but the platform isn't installing the actual Lerna package in the node_modules no matter what I do. I've gotten to the point where I have accessed the app files directly and tried running npm install lerna@6.0.0 on the server itself. The result is that it installs a number of packages and says that it has added Lerna as well, but actually hasn't.

~ $ npm install lerna@6.0.0
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN nx@15.6.2 requires a peer of @swc-node/register@^1.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN nx@15.6.2 requires a peer of @swc/core@^1.2.173 but none is installed. You must install peer dependencies yourself.
npm WARN project@1.0.0 No description
npm WARN project@1.0.0 No repository field.

+ lerna@6.0.0
added 16 packages from 7 contributors and audited 1081 packages in 26.529s
found 12 vulnerabilities (2 low, 2 moderate, 6 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
~ $ cd node_modules/
~/node_modules $ ls
@pnpm  cross-spawn  get-stream  human-signals  is-stream  isexe  merge-stream  mimic-fn  npm-run-path  onetime  path-key  shebang-command  shebang-regex  signal-exit  strip-final-newline  which
~/node_modules $ cd lerna
bash: cd: lerna: No such file or directory`

What could I be missing?

For some reason, the dev dependencies on my app were not installing. Even going into the server and manually running npm install for a given package did nothing if it was listed as a devDependency in the package.json . When I moved all dev dependencies to the runtime dependency list, my issue went away and everything was building as before.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM