Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Chalk version is not updated, leads to console error when used with create-react-app #2655

Closed
kerendot opened this issue Apr 29, 2019 · 2 comments

Comments

@kerendot
Copy link

The dependency chalk is outdated (using ^1.1.1 while the available version is 2.4.2.)

I am using node-sass in a create-react-app, which is using react-scripts v.3.0.0, which is also using chalk but in the advanced version (2.4.2). This versions conflict led to the following console error when running webpack-dev-server (using react-scripts):
TypeError: Cannot read property 'close' of undefined​​
(see pic attached)

The conflict was not solved by a clean npm install.
The workaround was to add ansi-styles as a dependency in my app's package.json.

I suggest to update chalk to the latest version so there will be no conflict.

  • NPM version : 6.4.1
  • Node version : 12.0.0
  • Node Platform : win32
  • Node architecture : x64
  • node-sass version : 4.12.0
  • npm node-sass versions : [email protected]

bug11

bug2

@xzyfer
Copy link
Contributor

xzyfer commented Apr 29, 2019 via email

@nschonni
Copy link
Contributor

Your workaround is how you should probably deal with a direct dependency for a particular library. EX: relying on the version a subpackage uses can cause issues. As @xzyfer pointed out, node-sass is not intended to run in the browser, so besides the shared depenedency, it doesn't seem like this is an issue for this repo

jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants