You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
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.
It seems strange to me that you could possibly get an error resulting from
node-sass in a browser console. I also don't understand how this conflict
could happen given how require is resolved in node. Withour more
information blaming node-sas feels like a red herring to me.
On Mon., 29 Apr. 2019, 10:57 pm Keren Cohen, ***@***.***> wrote:
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 : ***@***.***
[image: bug11]
<https://user-images.githubusercontent.com/29173459/56896805-7bba7780-6a95-11e9-8380-085046485662.png>
[image: bug2]
<https://user-images.githubusercontent.com/29173459/56897331-f1731300-6a96-11e9-9951-713c77a54073.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2655>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAENSWEL5MVDWJNRCS4GIODPS3WCJANCNFSM4HJDB3TQ>
.
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
The dependency
chalk
is outdated (using ^1.1.1 while the available version is 2.4.2.)I am using
node-sass
in acreate-react-app
, which is usingreact-scripts
v.3.0.0, which is also usingchalk
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.The text was updated successfully, but these errors were encountered: