I follow this steps in order to create a heroku
app to put inside my angular2-nodejs-express-mongodb application:
- heroku login
- cd my-project-app folder
- git init
- heroku git:remote -a my-app-name (That I previously created o heroku)
- Download my repo from github and copy all files into my-project-app folder
- Then I edit in
db.ts
the url of MongoDB server to a real server. (I create a MongoDB server with mLab) - npm i ng build -prod
And then when I arrive to the step 7 of the list I have a problem when I try to install modules in an Angular 2, the error is here:
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (/Users/xxx/Documents/workspace/full/node_modules/@angular/cli/tasks/build.js:16:56)
at Class.run (/Users/xxx/Documents/workspace/full/node_modules/@angular/cli/commands/build.js:143:26)
at Class.<anonymous> (/Users/xxx/Documents/workspace/full/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
and here you can see the versions of node & angular CLI:
@angular/cli: 1.0.0
node: 6.10.0
os: darwin x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
I read some posts but I didn't know how to solve it.
And I have another error to, when I try to connect to my db:
MongoDB shell version v3.4.2
connecting to: mongodb://ds021731.mlab.com:21731/users
MongoDB server version: 3.2.11
WARNING: shell and server versions do not match
via AAg
No comments:
Post a Comment