This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Can't complete the final new project step

Hi, New to apostrophe and followed the Creating your first project steps and all is fine until the final step 3. Once I run the commands in the terminal I receive this error.

cd test-project
 # Install our dependencies (most notably, Apostrophe)
 npm install
 # Add an admin user to the admin group; prompts for password
 node app.js apostrophe-users:add admin admin
 # Go go go!
 node app.js

zsh: command not found: #
cd: no such file or directory: test-project
zsh: number expected
audited 3860 packages in 4.671s

27 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

zsh: command not found: #
zsh: command not found: prompts
(node:10441) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(node:10441) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
_stream_readable.js:1157
return this.pipes.length;
^

TypeError: Cannot read property ‘length’ of undefined
at Cursor.get (_stream_readable.js:1157:25)
at decorate (/Users/tyronemay/test-project/node_modules/emulate-mongo-2-driver/index.js:34:20)
at decorateCursor (/Users/tyronemay/test-project/node_modules/emulate-mongo-2-driver/index.js:211:21)
at Object.newCollection.find (/Users/tyronemay/test-project/node_modules/emulate-mongo-2-driver/index.js:153:20)
at Object.self.lowLevelMongoCursor (/Users/tyronemay/test-project/node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:1283:27)
at /Users/tyronemay/test-project/node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:1266:30
at fn (/Users/tyronemay/test-project/node_modules/async/lib/async.js:746:34)
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:1213:16
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:166:37
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:706:43
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:167:37
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:1209:30
at /Users/tyronemay/test-project/node_modules/apostrophe/lib/modules/apostrophe-docs/lib/cursor.js:1422:16
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:726:13
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:52:16
at /Users/tyronemay/test-project/node_modules/async/lib/async.js:269:32

ignore the hash comments.

This has been fixed via the release of emulate-mongo-2-driver version 1.0.4. npm update should restore your Node 13 compatibility. If npm update somehow fails to pick it up, delete package-lock.json and run npm install again.

1 Like

Thank you much appreciated