Skip to content

node-sass should be a dependency or a peerDependency, not a devDependency? #590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
veltman opened this issue Jul 12, 2018 · 2 comments
Closed

Comments

@veltman
Copy link

veltman commented Jul 12, 2018

Previously, node-sass was in both peerDependencies and devDependencies. In #533 it was removed from peerDependencies. Now it's only listed in devDependencies, so the package only works if dev dependencies are installed and there's no warning if it's missing. Shouldn't node-sass be in dependencies instead, so it's always installed even in production mode? The package requires it to function, it's not just there for development purposes.

@alexander-akait
Copy link
Member

@veltman you should add node-sass to you dependencies, we write about this in docs, it is require to use sass-loader in boilerplate such as create-facebook-app and etc. Also we have PR with supporting dart-sass, i.e. it will be allow to install dart-sass instead node-sass. Also we throw error if node-sass not found.

@veltman
Copy link
Author

veltman commented Jul 13, 2018

I'm confused about this. The docs say:

"The sass-loader requires node-sass and webpack as peerDependency."

But this isn't true anymore, node-sass was removed as a peerDependency (#533)

It seems like it should EITHER be in peerDependencies or dependencies.

Currently, if the module is installed without dev dependencies you won't get a warning and the module will not work.

if node-sass is moved back to peerDependencies, then at least installing the module without installing node-sass will produce a warning.

If node-sass moved to dependencies, then the module will work, at the possible expense of duplicate installs.

Am I missing something? Shouldn't devDependencies be dependencies that are only needed for running tests or recompiling the module, not dependencies that the module will always crash without?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants