Forest-express missing in subfolder node_modules of forest-express-sequelize@8.5.12

Hi team,

Following ticket Message "Forbidden" when trying to create a chart - #10 by morganperre
I am trying to install the last release of forest-express-sequelize@8.5.12

Unfortunately, I have some problems to install it properly.
After installing the last release, the forest-express module is missing from forest-express-sequelize/node_modules

Feature(s) impacted

I need the forest-express submodule in the dependencies of forest-express-sequelize in order to use the documented workaround for using case insensitive searches in filters.

Illustration below.

with forest-express-sequelize@8.5.11

# npm install forest-express-sequelize@8.5.11

+ forest-express-sequelize@8.5.11
added 19 packages from 26 contributors, updated 1 package, moved 2 packages and audited 775 packages in 8.263s
...

# ls node_modules/forest-express-sequelize/node_modules/
'@babel'/    core-js/          inherits/    jsonapi-serializer/   one-time/          semver/           winston/
 async/      forest-express/   ipaddr.js/   lodash/               readable-stream/   string_decoder/
 bluebird/   http-errors/      is-stream/   moment-timezone/      safe-buffer/       uuid/

forest-express is present in node_modules subfolder of forest-express-sequelize

with forest-express-sequelize@8.5.12

# npm install forest-express-sequelize@8.5.12

+ forest-express-sequelize@8.5.12
removed 19 packages, updated 1 package, moved 2 packages and audited 756 packages in 5.124s

...

# ls node_modules/forest-express-sequelize/node_modules/
'@babel'/   bluebird/   core-js/   depd/   http-errors/   lodash/   semver/   setprototypeof/

forest-express is NOT present in node_modules subfolder of forest-express-sequelize

I have no idea why this occurs.

Context

Here is my current setup:

  • Project name: MyPocket
  • Environment name: Development

Before the upgrade

  "meta": {
    "liana": "forest-express-sequelize",
    "liana_version": "8.5.11",
    "stack": {
      "database_type": "multiple",
      "engine": "nodejs",
      "engine_version": "14.17.0" (npm 6.14.13)
      "orm_version": "5.22.3"
    }
  }

I cannot start the server with upgraded release because of the missing dependency.

I also tested with nodejs 14.20.0 (npm 6.14.17), but I had the same issue.

Thanks in advance
Louis-Marie

Hello @Louis-Marie,

Thanks for your feedback.

I tested on my side on a small project, I ran:

npm install forest-express-sequelize@latest

And after a npm start the server started correctly.

The installed version of forest-express-sequelize is 8.5.12, and forest-express@9.5.6 is installed directly under node_modules .

Can you try to remove your node_modules directory and run npm install again?

Hi @GuillaumeGautreau

I think you misunderstood my issue.

The installed version of forest-express-sequelize is 8.5.12 , and forest-express@9.5.6 is installed directly under node_modules

Yes, that is the case.

The problem is coming from the content of this folder:
./node_modules/forest-express-sequelize/node_modules

With forest-express-sequelize@8.5.11
=> it contains the forest-express folder

With forest-express-sequelize@8.5.12
=> it does not contain it… why?

Thanks in advance
Louis-Marie

Because npm installs dependencies where it wants, and sometimes it’s in a subfolder, sometimes not. When it gets installed in node_modules directly it’ll work just fine.

In my case I don’t have the forest-express dependency declared in my package.json but npm decided to install it in the root node_modules folder anyway and it works just fine.

Finally, I found where my issue is coming from.

It was because, in my previous release, I had a different dependent version of forest-express than the one specified in forest-express-sequelize dependency requirements.

npm was detecting 2 different releases and needed to install 2 different ones in my previous install.

All is clean now, with only one directly in my local node_modules directory.

Thanks for your help.

2 Likes