Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] npm: ERR! cb() never called!
Date: Thu, 17 Sep 2015 14:04:01
Message-Id: 55FAC831.40900@gmail.com
1 Anyone here familiar with driving nodejs and npm?
2
3 I'm trying to write an ebuild for a musicbrainz mirror server and "npm
4 install" keeps erroring out with one of two errors:
5
6 1. The install does finish but npm doesn't get around to exiting,
7 verified by stopping the emerge, running npm install manually and seeing
8 that it does nothing. When it stalls strace shows the last call was
9 (poll,<number> ), which implies a race condition.
10
11 2. More and more often now I get the dreaded "npm: ERR! cb() never
12 called!" error message which Google and stackoverflow say has been an
13 ongoing issue for 3 years now. If I keep retrying it eventually
14 succeeds, implying a race condition of some sort.
15
16 I do this in src_prepare(): [1]
17 src_prepare() {
18 npm install npm || die
19 npm install || die
20 }
21 following the lead of the ony other ebuild in the tree that does npm
22 install - bokeh-0.7.1
23
24 The package.json file from musicbrainz.com is this, it looks OK to me:
25
26 {
27 "name": "musicbrainz-server",
28 "version": "0.0.0",
29 "description": "package.json for keeping track of musicbrainz-server
30 nodejs dependencies",
31 "repository": {
32 "type": "git",
33 "url": "https://github.com/metabrainz/musicbrainz-server.git"
34 },
35 "license": "GPLv2+",
36 "dependencies": {
37 "aclass": "0.5.1",
38 "babel": "^5.8.21",
39 "babel-core": "^5.8.22",
40 "babelify": "^6.1.3",
41 "balanced-match": "0.2.0",
42 "cookie": "^0.1.2",
43 "envify": "^3.4.0",
44 "filesize": "2.0.4",
45 "gulp": "^3.8.7",
46 "gulp-less": "^3.0.0",
47 "gulp-rev": "^2.0.1",
48 "gulp-streamify": "^0.0.5",
49 "immutable": "3.6.4",
50 "jed": "1.1.0",
51 "jquery": "1.11.2",
52 "jquery.browser": "gabceb/jquery-browser-plugin#e4a01fd",
53 "knockout": "mwiencek/knockout#a8f12df",
54 "knockout-arraytransforms": "^2.0.0",
55 "less-plugin-clean-css": "^1.4.0",
56 "leven": "^1.0.2",
57 "lodash": "^3.9.3",
58 "parse-stack": "0.1.3",
59 "po2json": "^0.3.2",
60 "q": "^1.1.1",
61 "rcss": "0.1.4",
62 "react": "0.13.1",
63 "shelljs": "^0.3.0",
64 "tablesorter": "Mottie/tablesorter#430f8c5",
65 "through2": "^0.6.1",
66 "uglifyify": "^3.0.1",
67 "vinyl": "^0.4.6",
68 "vinyl-source-stream": "^1.0.0",
69 "yarb": "^0.4.4"
70 },
71 "devDependencies": {
72 "eslint": "^0.24.0",
73 "eslint-plugin-react": "^2.6.4",
74 "gulp-watch": "^4.2.1",
75 "tape": "^4.0.0"
76 },
77 "private": true
78 }
79
80
81 --
82 Alan McKinnon
83 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] npm: ERR! cb() never called! Michael Orlitzky <mjo@g.o>