Open thure opened 7 years ago
Just got same error.
node 8.0.0 npm 5.0.4 OS X
works well when downgraded to node 6.10.3
There are some mentions of deepEqual in the node 8.x changelog, but nothing marked as breaking: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md
Might be a regression in node 8, or one of those "bug that turned into a feature".
Googling for "node 8 deepequal" brings up this issue as the first result.
Probably this isn't related to deepEqual at all.
Or is it? Maybe this isn't working anymore: https://github.com/rxaviers/cldr-data-downloader/blob/f60385580b7db9ef8a0a8a137d95e08abccb854e/lib/util.js#L20-L23
Well, the util/deepEqual method seems to work fine, I guess the problem is indeed in the data passed into it.
For debugging, should change this line: https://github.com/rxaviers/cldr-data-downloader/blob/285cde6a39a54ea42d87d4f6d410b87ec54bd23f/bin/download.js#L82 - to output error.stack
instead of error.message
. stack
includes the message, AND the stack trace.
After trying this again myself (got the error report from someone else today), I was unable to reproduce the error.
$ node --version
v8.1.4
$ npm --version
5.0.3
Does someone else have the issue with these versions? Maybe it got indeed fixed.
Though the report I got today was also on node 8.1.4. No idea.
Same error here, node v8.1.4
and npm 5.0.3
The error occurs because state.json
is missing. This file should be created when installing cldr-data
but somehow this is not the case. If it isn't there the default is an empty object {}
which leads to the deepEqual failure. Will continue to debug further...
I solved this issue by modifying cldr-data-downloader/lib/util.js
this way:
https://pastebin.com/3m5Kaqpj
I made a delay on running deepEqual by using a setTimeout
.
I know it's just a trick and not the solution but may help to find it.
Given the two last comments, i.e., the missing state.json
and the use of a timeout to fix the problem, it looks like in npm 8, the post installation is executed prior to the node_modules files creation. Is it? Can someone confirm? If so, it looks like we need to use a different approach, something like this https://github.com/rxaviers/cldr-data-npm/issues/28
Is there any progress on this?
I have same problem.
Node v8.6.0 npm 5.4.2
Anyone willing to provide a fix? Guideline in my above comment.
this is blocking node 8 for me :( 🆘
I've got this error as well, updating cldr-data@31.0.2
package resolved this issue but produced another one.
Received 41238K total.
Unpacking it into `./`
Whops ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/l10ns/node_modules/cldr-data/.gitattributes'
It seems like adm-zip
is not allowed to write to the folder in cldr-data
:
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/l10ns/node_modules/cldr-data-test/.gitattributes
Heads up: A workaround for this problem is to use yarn
instead of npm
.
So with node 9.2.0, npm install works (npm 5.5.1), but yarn (1.3.2) produces the same deepEqual error
FYI, I encountered this on version 28 as well, but upgrading to the latest (version 32) of cldr-data
worked properly.
node v8.9.4 (npm v5.6.0)
Heads up: A workaround for this problem is to use yarn instead of npm.
Tried it with yarn
, got the same exact error. (node 8.9.0, npm 5.5.1)
I got the error for version 0.2.x but resolved by upgrading to cldr-data-downloader@0.3.3
(node 8.9.0, npm 5.5.1)
Installing
cldr-data
using Node 8 & NPM 5 throws this error:Where
<<project dir>>
is the working directory ofnpm install
.I can't tell why the error is truncated, or if this is just the intended error. Installing with Node v7.5.0 and NPM 4.1.2 works.