mapnik / node-mapnik

Bindings to mapnik for node.js
http://mapnik.org/documentation/node-mapnik
BSD 3-Clause "New" or "Revised" License
530 stars 165 forks source link

ENOTEMPTY: directory not empty with node-pre-gyp #866

Closed pnorman closed 6 years ago

pnorman commented 6 years ago

When installing ~3.5.0 with npm install mapnik --build-from-source I get this error

$ npm install mapnik --build-from-source                                                            [108/790]
npm WARN deprecated protozero@1.4.5: protozero should no longer be used via npm, install instead via https://github.com/mapbox/mason

> mapnik@3.5.14 preinstall /home/pnorman/work/wmf/kartotherian/node_modules/.staging/mapnik-a77bddc7
> npm install node-pre-gyp

mapnik@3.5.14 /home/pnorman/work/wmf/kartotherian/node_modules/.staging/mapnik-a77bddc7
└─┬ node-pre-gyp@0.6.39
  ├── detect-libc@1.0.3
  ├─┬ hawk@3.1.3
  │ ├── boom@2.10.1
  │ ├── cryptiles@2.0.5
  │ ├── hoek@2.16.3
  │ └── sntp@1.0.9
  ├─┬ mkdirp@0.5.1
  │ └── minimist@0.0.8
  ├─┬ nopt@4.0.1
  │ ├── abbrev@1.1.1
  │ └─┬ osenv@0.1.5
  │   ├── os-homedir@1.0.2
  │   └── os-tmpdir@1.0.2
  ├─┬ npmlog@4.1.2
  │ ├─┬ are-we-there-yet@1.1.4
  │ │ └── delegates@1.0.0
  │ ├── console-control-strings@1.1.0
  │ ├─┬ gauge@2.7.4
  │ │ ├── aproba@1.2.0
  │ │ ├── has-unicode@2.0.1
  │ │ ├── object-assign@4.1.1
  │ │ ├── signal-exit@3.0.2
  │ │ ├─┬ string-width@1.0.2
  │ │ │ ├── code-point-at@1.1.0
  │ │ │ └─┬ is-fullwidth-code-point@1.0.0
  │ │ │   └── number-is-nan@1.0.1
  │ │ ├─┬ strip-ansi@3.0.1
  │ │ │ └── ansi-regex@2.1.1
  │ │ └── wide-align@1.1.2
  │ └── set-blocking@2.0.0
  ├─┬ rc@1.2.6
  │ ├── deep-extend@0.4.2
  │ ├── ini@1.3.5
  │ ├── minimist@1.2.0
  │ └── strip-json-comments@2.0.1
  ├─┬ request@2.81.0
  │ ├── aws-sign2@0.6.0
  │ ├── aws4@1.6.0
  │ ├── caseless@0.12.0
  │ ├─┬ combined-stream@1.0.6
  │ │ └── delayed-stream@1.0.0
  │ ├── extend@3.0.1
  │ ├── forever-agent@0.6.1                                                                                                                [58/790]
  │ ├─┬ form-data@2.1.4
  │ │ └── asynckit@0.4.0
  │ ├─┬ har-validator@4.2.1
  │ │ ├─┬ ajv@4.11.8
  │ │ │ ├── co@4.6.0
  │ │ │ └─┬ json-stable-stringify@1.0.1
  │ │ │   └── jsonify@0.0.0
  │ │ └── har-schema@1.0.5
  │ ├─┬ http-signature@1.1.1
  │ │ ├── assert-plus@0.2.0
  │ │ ├─┬ jsprim@1.4.1
  │ │ │ ├── assert-plus@1.0.0
  │ │ │ ├── extsprintf@1.3.0
  │ │ │ ├── json-schema@0.2.3
  │ │ │ └─┬ verror@1.10.0
  │ │ │   └── assert-plus@1.0.0
  │ │ └─┬ sshpk@1.14.1
  │ │   ├── asn1@0.2.3
  │ │   ├── assert-plus@1.0.0
  │ │   ├── bcrypt-pbkdf@1.0.1
  │ │   ├─┬ dashdash@1.14.1
  │ │   │ └── assert-plus@1.0.0
  │ │   ├── ecc-jsbn@0.1.1
  │ │   ├─┬ getpass@0.1.7
  │ │   │ └── assert-plus@1.0.0
  │ │   ├── jsbn@0.1.1
  │ │   └── tweetnacl@0.14.5
  │ ├── is-typedarray@1.0.0
  │ ├── isstream@0.1.2
  │ ├── json-stringify-safe@5.0.1
  │ ├─┬ mime-types@2.1.18
  │ │ └── mime-db@1.33.0
  │ ├── oauth-sign@0.8.2
  │ ├── performance-now@0.2.0
  │ ├── qs@6.4.0
  │ ├── safe-buffer@5.1.1
  │ ├── stringstream@0.0.5
  │ ├─┬ tough-cookie@2.3.4
  │ │ └── punycode@1.4.1
  │ ├── tunnel-agent@0.6.0
  │ └── uuid@3.2.1
  ├─┬ rimraf@2.6.2
  │ └─┬ glob@7.1.2
  │   ├── fs.realpath@1.0.0
  │   ├── inflight@1.0.6
  │   ├─┬ minimatch@3.0.4
  │   │ └─┬ brace-expansion@1.1.11
  │   │   ├── balanced-match@1.0.0
  │   │   └── concat-map@0.0.1
  │   └── path-is-absolute@1.0.1
  ├── semver@5.5.0
  ├─┬ tar@2.2.1
  │ ├── block-stream@0.0.9
  │ ├─┬ fstream@1.0.11
  │ │ └── graceful-fs@4.1.11
  │ └── inherits@2.0.3
  └─┬ tar-pack@3.4.1
    ├─┬ debug@2.6.9
    │ └── ms@2.0.0
    ├── fstream-ignore@1.0.5
    ├─┬ once@1.4.0
    │ └── wrappy@1.0.2
    ├─┬ readable-stream@2.3.5
    │ ├── core-util-is@1.0.2
    │ ├── isarray@1.0.0
    │ ├── process-nextick-args@2.0.0
    │ ├── string_decoder@1.0.3
    │ └── util-deprecate@1.0.2
    └── uid-number@0.0.6

npm WARN mapnik@3.5.14 No license field.
kartotherian@0.0.34 /home/pnorman/work/wmf/kartotherian
└── extend@3.0.1

npm ERR! Linux 4.9.0-4-amd64
npm ERR! argv "/home/pnorman/.nvm/versions/node/v6.12.3/bin/node" "/home/pnorman/.nvm/versions/node/v6.12.3/bin/npm" "install" "mapnik" "--build-fr
om-source"
npm ERR! node v6.12.3
npm ERR! npm  v3.10.10
npm ERR! path /home/pnorman/work/wmf/kartotherian/node_modules/.mapnik.DELETE/node_modules/node-pre-gyp
npm ERR! code ENOTEMPTY
npm ERR! errno -39
npm ERR! syscall rename

npm ERR! ENOTEMPTY: directory not empty, rename '/home/pnorman/work/wmf/kartotherian/node_modules/.mapnik.DELETE/node_modules/node-pre-gyp' -> '/ho
me/pnorman/work/wmf/kartotherian/node_modules/mapnik/node_modules/node-pre-gyp'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pnorman/work/wmf/kartotherian/npm-debug.log

node_modules contains extend and .mapnik.DELETE, and the node_modules/.mapnik.DELETE/node_modules/node-pre-gyp/ directory contains stuff.

npm-debug.log attached.

eigenwillig commented 6 years ago

I've got the same error.

BTW: The Wikipedia maps style really sucks because it's just another pale style which we have tons of.

springmeyer commented 6 years ago

I've also encountered this error and its been confounding and hard to replicate. I recommend trying again with the latest npm version npm install npm -g, removing any package-lock.json temporarily, and then seeing if the problem goes away. If not please create a new ticket with details of what versions of things you've tried.

htuohz commented 2 years ago

npm install npm -g

Thanks, this solved my problem.

raviThakur-mck commented 2 years ago

npm install npm -g Thanks , it worked ``