Autodesk-Forge / forge-rcdb.nodejs

Forge Responsive Connected Database: A responsive React-based web application that showcases the use of Autodesk Forge Viewer and Forge web services ...
https://forge-rcdb.autodesk.io/
272 stars 180 forks source link

questions #38

Closed Pepin1983 closed 6 years ago

Pepin1983 commented 6 years ago

Hi

Thanks,

I am an absolutely newbee of this , i have very limited Knowledge of Node JS, my first goal is two view the example on my local machine, i did every step according to the instruction, but only got a page header as forge RCDB and an empty page, there are some errors in the installation process, also errors from the build section. i am guessing do i need filling my autodesk forge app credentials to get this project running locally ? couse the final errors says mongobase errors and The client_id specified does not have access to the api product

could you please help me check the message in the CMD below ?


Child html-webpack-plugin for "index.html": Asset Size Chunks Chunk Names index.html 547 kB 0 Child worker: Asset Size Chunks Chunk Names ed09e033731a0e3eb521.worker.js 814 kB 0 [emitted] [big] main

forge-rcdb@4.0.0 start C:\forge-rcdb.nodejs node bin/start.js

Server listening on PORT: 3000 ENV: undefined Unhandled Rejection at: Promise Promise {

{ developerMessage: 'The client_id specified does not have access to the api product', userMessage: '', errorCode: 'AUTH-001', 'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' } } reason: { developerMessage: 'The client_id specified does not have access to the api product', userMessage: '', errorCode: 'AUTH-001', 'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' } Unhandled Rejection at: Promise Promise { { developerMessage: 'The client_id specified does not have access to the api product', userMessage: '', errorCode: 'AUTH-001', 'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' } } reason: { developerMessage: 'The client_id specified does not have access to the api product', userMessage: '', errorCode: 'AUTH-001', 'more info': 'http://developer.api.autodesk.com/documentation/v1/errors/AUTH-001' } Unhandled Rejection at: Promise Promise { { MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] at Pool. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\topologies\server.js:336:35) at emitOne (events.js:116:13) at Pool.emit (events.js:211:7) at Connection. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\pool.js:280:12) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Connection.emit (events.js:214:7) at Socket. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\connection.js:187:49) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) name: 'MongoError', message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' } } reason: { MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] at Pool. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\topologies\server.js:336:35) at emitOne (events.js:116:13) at Pool.emit (events.js:211:7) at Connection. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\pool.js:280:12) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Connection.emit (events.js:214:7) at Socket. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\connection.js:187:49) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) name: 'MongoError', message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' } uncaughtException { MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] at Pool. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\topologies\server.js:336:35) at emitOne (events.js:116:13) at Pool.emit (events.js:211:7) at Connection. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\pool.js:280:12) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Connection.emit (events.js:214:7) at Socket. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\connection.js:187:49) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) name: 'MongoError', message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' } MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] at Pool. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\topologies\server.js:336:35) at emitOne (events.js:116:13) at Pool.emit (events.js:211:7) at Connection. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\pool.js:280:12) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Connection.emit (events.js:214:7) at Socket. (C:\forge-rcdb.nodejs\node_modules\mongodb-core\lib\connection\connection.js:187:49) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) Cleaning Dir: C:\forge-rcdb.nodejs\TMP Error: Not connected at Promise (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:170:18) at new Promise () at MongoStore.collectionReady (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:163:19) at MongoStore.set (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:239:32) at Session.save (C:\forge-rcdb.nodejs\node_modules\express-session\session\session.js:72:25) at Session.save (C:\forge-rcdb.nodejs\node_modules\express-session\index.js:381:15) at ServerResponse.end (C:\forge-rcdb.nodejs\node_modules\express-session\index.js:330:21) at ReadStream.onend (_stream_readable.js:595:10) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20) Error: Not connected at Promise (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:170:18) at new Promise () at MongoStore.collectionReady (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:163:19) at MongoStore.set (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:239:32) at Session.save (C:\forge-rcdb.nodejs\node_modules\express-session\session\session.js:72:25) at Session.save (C:\forge-rcdb.nodejs\node_modules\express-session\index.js:381:15) at ServerResponse.end (C:\forge-rcdb.nodejs\node_modules\express-session\index.js:330:21) at ReadStream.onend (_stream_readable.js:595:10) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20) Error: Not connected at Promise (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:170:18) at new Promise () at MongoStore.collectionReady (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:163:19) at MongoStore.set (C:\forge-rcdb.nodejs\node_modules\connect-mongo\src\index.js:239:32) at Session.save (C:\forge-rcdb.nodejs\node_modules\express-session\session\session.js:72:25) at Session.save (C:\forge-rcdb.nodejs\node_modules\express-session\index.js:381:15) at ServerResponse.end (C:\forge-rcdb.nodejs\node_modules\express-session\index.js:330:21) at ReadStream.onend (_stream_readable.js:595:10) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20)
leefsmp commented 6 years ago

This is an advanced sample, so I would recommend you first get some experience with something simpler and smaller, for example forge-react-boiler.nodejs.

Your env is not set ENV: undefined, you need to define it with set NODE_ENV=development or in your environment variables settings. On the developer portal make sure your keys have access to DataManagement, Model Derivatives APIs. Make sure you are running mongoDB locally. You will need to populate the collections with your own models, translated with your own API keys. Example of my records are in /resources/db/dev.

Pepin1983 commented 6 years ago

thanks, that give me many hints to breakthrough this. i will also try some simple version as well.

leefsmp commented 6 years ago

Also keep in mind this is an on-going project I'm working on for a year and a half now, I'm regularly updating it by adding new extensions and demos that you can find at forge-rcdb.autodesk.io/configurator . Although most of the skeleton and building blocks of the app are rather stable, I may push breaking updates at some point. The whole sample is provided as-is, with no guarantee of compatibility through time.

Pepin1983 commented 6 years ago

Thanks, this really interest me, since my PhD topic is about industrial asset managment which we would like to integrate the 3D IOT environment into our research, this will be a great demo of our results .