Closed unknownids closed 7 years ago
Not sure the exact issue, looks like it doesn't like the objectstream module. Maybe try npm install again? Maybe npm update for an outdated module?
I got the same error, along with some others during the npm install:
C:\apps\AGStoShapefile-master>npm install
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
AGStoSHP@0.0.1 C:\apps\AGStoShapefile-master
+-- esri2geo@0.1.3
| -- request@2.27.0 | +-- aws-sign@0.3.0 | +-- cookie-jar@0.3.0 | +-- forever-agent@0.5.2 | +-- form-data@0.1.4 | |
-- combined-stream@0.0.7
| | -- delayed-stream@0.0.5 | +-- hawk@1.0.0 | | +-- boom@0.4.2 | | +-- cryptiles@0.2.2 | | +-- hoek@0.9.1 | |
-- sntp@0.2.4
| +-- http-signature@0.10.1
| | +-- asn1@0.1.11
| | +-- assert-plus@0.1.5
| | -- ctype@0.5.3 | +-- mime@1.2.11 | +-- node-uuid@1.4.8 | +-- oauth-sign@0.3.0 | +-- qs@0.6.6 |
-- tunnel-agent@0.3.0
+-- objectstream@0.0.4
+-- ogr2ogr@0.5.1
| +-- archiver@0.12.0
| | +-- async@0.9.2
| | +-- buffer-crc32@0.2.13
| | +-- glob@4.0.6
| | | +-- graceful-fs@3.0.11
| | | | -- natives@1.1.0 | | | +-- inherits@2.0.3 | | | +-- minimatch@1.0.0 | | | | +-- lru-cache@2.7.3 | | | |
-- sigmund@1.0.1
| | | -- once@1.4.0 | | |
-- wrappy@1.0.2
| | +-- lazystream@0.1.0
| | +-- lodash@2.4.2
| | +-- readable-stream@1.0.34
| | | +-- core-util-is@1.0.2
| | | +-- isarray@0.0.1
| | | -- string_decoder@0.10.31 | | +-- tar-stream@1.0.2 | | | +-- bl@0.9.5 | | | +-- end-of-stream@1.4.0 | | |
-- xtend@4.0.1
| | -- zip-stream@0.4.1 | |
-- compress-commons@0.1.6
| | -- crc32-stream@0.3.4 | +-- comma-separated-values@3.6.4 | +-- findit@2.0.0 | +-- rimraf@2.6.1 | |
-- glob@7.1.1
| | +-- fs.realpath@1.0.0
| | +-- inflight@1.0.6
| | +-- minimatch@3.0.3
| | | -- brace-expansion@1.1.6 | | | +-- balanced-match@0.4.2 | | |
-- concat-map@0.0.1
| | -- path-is-absolute@1.0.1 |
-- unzip@0.1.11
| +-- binary@0.3.0
| | +-- buffers@0.1.1
| | -- chainsaw@0.1.0 | |
-- traverse@0.3.9
| +-- fstream@0.1.31
| | -- mkdirp@0.5.1 | |
-- minimist@0.0.8
| +-- match-stream@0.0.2
| +-- pullstream@0.4.1
| | +-- over@0.0.5
| | -- slice-stream@1.0.0 |
-- setimmediate@1.0.5
+-- q@1.5.0
+-- query-string@3.0.3
| -- strict-uri-encode@1.1.0 +-- request@2.81.0 | +-- aws-sign2@0.6.0 | +-- aws4@1.6.0 | +-- caseless@0.12.0 | +-- combined-stream@1.0.5 | |
-- delayed-stream@1.0.0
| +-- extend@3.0.0
| +-- forever-agent@0.6.1
| +-- form-data@2.1.2
| | -- asynckit@0.4.0 | +-- har-validator@4.2.1 | | +-- ajv@4.11.5 | | | +-- co@4.6.0 | | |
-- json-stable-stringify@1.0.1
| | | -- jsonify@0.0.0 | |
-- har-schema@1.0.5
| +-- hawk@3.1.3
| | +-- boom@2.10.1
| | +-- cryptiles@2.0.5
| | +-- hoek@2.16.3
| | -- sntp@1.0.9 | +-- http-signature@1.1.1 | | +-- assert-plus@0.2.0 | | +-- jsprim@1.4.0 | | | +-- assert-plus@1.0.0 | | | +-- extsprintf@1.0.2 | | | +-- json-schema@0.2.3 | | |
-- verror@1.3.6
| | -- sshpk@1.11.0 | | +-- 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.6
| | | -- assert-plus@1.0.0 | | +-- jodid25519@1.0.2 | | +-- 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.15
| | -- mime-db@1.27.0 | +-- oauth-sign@0.8.2 | +-- performance-now@0.2.0 | +-- qs@6.4.0 | +-- safe-buffer@5.0.1 | +-- stringstream@0.0.5 | +-- tough-cookie@2.3.2 | |
-- punycode@1.4.1
| +-- tunnel-agent@0.6.0
| -- uuid@3.0.1
-- winston@2.3.1
+-- async@1.0.0
+-- colors@1.0.3
+-- cycle@1.0.3
+-- eyes@0.1.8
`-- stack-trace@0.0.9
npm WARN AGStoSHP@0.0.1 No repository field.
C:\apps\AGStoShapefile-master>node agstoshp.js util.js:973 throw new TypeError('The super constructor to "inherits" must not ' + ^
TypeError: The super constructor to "inherits" must not be null or undefined
at Object.exports.inherits (util.js:973:11)
at Object.
Can you specify which version of Node you are running? In your terminal or command prompt, type node -v
It looks like the problem is coming from objectstream
var EventEmitter = process.EventEmitter;
util.inherits(ObjectDeserializeStream, EventEmitter);
My guess is that process.EventEmitter is null. Can you try running node in command line and typing process.EventEmitter
and see what is returned?
For now, you can try this workaround. In node_modules/objectstream/lib/objectstream.js
, replace:
var EventEmitter = process.EventEmitter
with
var EventEmitter = require('events');
Let me know if that works. If so, I'll submit a pull request to the objectstream library
That worked! Thanks tannerjt!
My npm version is 4.1.2 node version 7.7.4.0 (32bit) Windows 10
That's great, I'll let the maintainer of the objectstream library know
[root@vps96840 ags]# node AGStoSHP.js util.js:962 throw new TypeError('The super constructor to "inherits" must not ' + ^
TypeError: The super constructor to "inherits" must not be null or undefined at Object.exports.inherits (util.js:962:11) at Object. (/home/travis/ags/node_modules/objectstream/lib/objectstream.js:43:6)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/travis/ags/AGStoSHP.js:13:20)