Open naganaidu-rezi opened 1 year ago
fsevents is not directly used by this package. It's not my module so of course I can't just add linux support to it. It's only coming in as an optional dependency within chokidar which in turn is only included due to Mocha. Mocha is used for unit testing and is a devDepenency in this project. It shouldn't be included in any production builds.
Are you able to install the package into your project in the linux environment and test the project there. I use this module in BAS with Linux all the time and I've never encountered this issue. Are you doing a production build? With MBT? A bit more details about the situation you are encountering would be helpful.
One thing I've done just now that might help is I've deleted and recreated the npm-shrinkwrap for the module. Reading a lot of different threads about fsevents online, it seems to be a common issue in npm or yarn to include it fully in the dependencies incorrectly. See if the new shrinkwrap definition helps.
Sorry Jung for the delay, yes we are using mat build and we added to dev dependencies but still it is getting into the build. we have also added to the optional but didn't work
so hardcoded linux os support to package-lock.json and built it
is would be great if you able to add OS Linux
I don't know what "mat build" is. You added what to dev dependencies?
is would be great if you able to add OS Linux
I don't have any control here. The module in question isn't mine. It dependency of a dependency. It's only part of mocha which is a testing module and only used at development. Hence mocha being in the dev dependency of my module. Delete your package-lock.json and rerun npm install in production mode. You shouldn't get this inner dependency at all.
sorry it was typo "mbt" tool
Hi @naganaidu-rezi ,
We had the same issue with our build. However Thomas fixed the issue with the recreation of the npm-shrinkwrap module. We updated the sap-hdbext-promisfied dependency in our application to the latest version and the build works fine now. Thx for the fix.
Kr
Thank you Karel
For some reason our package-lock.json does not update with this "optional" value so it keeps throwing errors, even though we are on latest version of this module. Any ideas? If I manually add it (optional: true) to the package-lock.json it works fine.
I have completely removed Mocha from the Dev Dependencies. Unit tests will require that Mocha be installed globally in the development environment. But only project contributors will be running the unit tests. Therefore, consumption should be easier moving foward as we shouldn't have issues with the shrinkwrap incorrectly including the wrong dependencies for fsevents.
we are building npm package on linux machine but this module has dependencies just with OS type as Darwin, can you also add OC type linux to it please ?
error:
npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin"} (current: {"os":"linux"}) npm ERR! notsup Valid os: darwin npm ERR! notsup Actual os: linux npm ERR! A complete log of this run can be found in: /home/ec2-user/.npm/_logs/2023-04-11T06_36_05_000Z-debug-0.log [2023-04-11 06:36:05] ERROR the "before-all"" build failed: could not execute the "npm ci --include=dev" command: exit status 1 make: *** [pre_build] Error 1 Error: could not build the MTA project