os-js / osjs-panels

OS.js Panels Module

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`@osjs/event-emitter` is listed as a dev dependency

corwin-of-amber opened this issue · comments

Looks like this should be a normal dependency. Right?
I encountered a build scenario where it was missing somehow.

All @osjs/ scoped packages are published pre-built, so this is normally not an issue.

Could you elaborate how you encountered this ?

Hi, thanks for replying. I am experimenting with OS.js and found it useful to create this playground. I found it easier to use Parcel instead of Webpack; surprisingly enough, everything builds correctly. But this one dependency was missing because I ran npm i at the root of the repo, which apparently does not install dev dependencies for sub-modules.

I agree that this is a non-issue if one just wants to use the official prebuilt "binaries".

That's a bit strange. The standard install action should install dev dependencies as well (as long as --only= and NODE_ENV is not set) 🤔

Was there any warnings or errors emitted ?

install dev dependencies

As I said, this scenario is a bit special. I wanted a repo that a user can clone and then just run npm i at the root and start working. So I included @osjs/{client,gui,panels} as submodules and installed them via e.g. npm i packages/osjs-client; this creates a link in the root node_modules/ and also installs sub-dependencies, but not dev dependencies of the sub-modules, since it does not run prepare or build on them.

I see. I'm able to reproduce this with your structure.

Maybe you could open a PR on this that moves the dependency down to dependencies section instead ?

Gladly 👍

I'm using lerna (https://github.com/os-js/lerna) so this has gone unnoticed due to how it links npm packages, so appreciate it :)