Shubham Verma
Shubham Verma

Reputation: 9933

In angular 2 , Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults?

I searched and didn't found an answer to this question on stackovefflow . I am new in Angular 2, I am creating a demo app but when I am doing npm start then this message showing on terminal/console.Though it is not doing any harm but i want to remove this error, can anyone tell me what it the meaning of this error message and how to remove this message?

message showing on console is:

Did not detect a bs-config.json or bs-config.js override file. Using lite-server defaults.

[1] Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
[1] ** browser-sync config **
[1] { injectChanges: false,
[1]   files: [ './**/*.{html,htm,css,js}' ],
[1]   watchOptions: { ignored: 'node_modules' },
[1]   server: { baseDir: './', middleware: [ [Function], [Function] ] } }
[0] 11:09:39 AM - Compilation complete. Watching for file changes.
[1] [BS] Access URLs:
[1]  ------------------------------------
[1]        Local: http://localhost:3000
[1]     External: http://172.18.4.98:3000
[1]  ------------------------------------
[1]           UI: http://localhost:3001
[1]  UI External: http://172.18.4.98:3001
[1]  ------------------------------------
[1] [BS] Serving files from: ./

See the snapshot: enter image description here

Upvotes: 2

Views: 4415

Answers (2)

Obaid
Obaid

Reputation: 1445

You are using lite-server which in turn uses BrowserSync. It allows you to override default server config using the bs-config.json or bs-config.js file.

Just create a bs-config.json or bs-config.js in the root directory of you app and this warning would go away. Unless you need to modify the default server config there is no need to create one.

Link to custom configuration doc

Upvotes: 2

cfuchs
cfuchs

Reputation: 11

Observed the same when I tried out the latest tutorial https://angular.io/guide/quickstart; back there, they briefly mentioned bs-config.json, but did not explicitly say that you (the reader of the tutorial) had to create that file manually (so I didn't).

Solution in my case: Scrolled down the tutorial page (link above) to the "And here are the files" section, selected bs-config.json, clicked "Copy Code" (copy to clipboard), and then created bs-config.json (in my project root folder) with the clipboard content.

Upvotes: 1

Related Questions