have a new project but when ng serve i get error

ng serve not working
how ng serve works
the new command requires to be run outside of a project, but a project definition was found at
you have to be inside an angular-cli project in order to use the serve command.
ng serve debug
angular cli version for node 8
ng serve --open browser
ng serve --host

I need to change this topic, I cant post new topic. I have update the script, and install new package. I still get errors but not the one i post last.

                             _                           _  _
  __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
 / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
 \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
               |___/
angular-cli: 1.0.0-beta.26
node: 8.12.0
os: linux x64
@angular/animations: 6.1.9
@angular/cdk: 6.4.7
@angular/common: 6.1.9
@angular/compiler: 6.1.9
@angular/core: 6.1.9
@angular/forms: 6.1.9
@angular/http: 6.1.9
@angular/material: 2.0.0-beta.10
@angular/platform-browser: 6.1.9
@angular/platform-browser-dynamic: 6.1.9
@angular/platform-server: 6.1.9
@angular/router: 6.1.9
@angular/compiler-cli: 6.1.9
@ngtools/webpack: 1.10.2

I get this errors now. and this is new error that i dont now how to fix.

WARNING in ./~/ng2-webstorage/dist/app.js
11:35-46 "export 'OpaqueToken' was not found in '@angular/core'

WARNING in ./~/@angular/material/@angular/material.es5.js
6128:45-70 "export 'ConnectedOverlayDirective' was not found in '@angular/cdk/overlay'

WARNING in ./~/@angular/material/@angular/material.es5.js
13725:44-56 "export 'OverlayState' was not found in '@angular/cdk/overlay'

WARNING in ./~/@angular/material/@angular/material.es5.js
15765:42-54 "export 'OverlayState' was not found in '@angular/cdk/overlay'

WARNING in ./~/@angular/material/@angular/material.es5.js
16831:48-60 "export 'OverlayState' was not found in '@angular/cdk/overlay'

WARNING in ./~/@angular/material/@angular/material.es5.js
17553:48-60 "export 'OverlayState' was not found in '@angular/cdk/overlay'

WARNING in ./~/@angular/material/@angular/material.es5.js
18421:48-60 "export 'OverlayState' was not found in '@angular/cdk/overlay'

WARNING in ./~/@angular/material/@angular/material.es5.js
19726:48-60 "export 'OverlayState' was not found in '@angular/cdk/overlay'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
139:16-23 "export 'trigger' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
140:20-25 "export 'state' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
140:38-43 "export 'style' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
144:20-25 "export 'state' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
144:36-41 "export 'style' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
148:20-30 "export 'transition' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/dropdown/dropdown.ts
148:54-61 "export 'animate' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
53:16-23 "export 'trigger' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
54:20-25 "export 'state' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
54:38-43 "export 'style' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
59:20-25 "export 'state' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
59:36-41 "export 'style' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
64:20-30 "export 'transition' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
64:53-60 "export 'animate' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
65:20-30 "export 'transition' was not found in '@angular/core'

WARNING in ./~/angular2-semantic-ui/components/accordion/accordion_panel.ts
65:53-60 "export 'animate' was not found in '@angular/core'

And i cant find answer to this errors. I hope i can find answer now so i can keep on with this script.

I would recommend reading this:

https://www.techiediaries.com/updating-angular-cli-projects/

On this page it states:

Angular 6 uses angular.json instead of angular-cli.json. This can be achieved using :

ng update @angular/cli

This solved my issue.

Good luck

Angular CLI Error: The serve command requires to be run in an , Make sure you have set the new angular version configuration in your project. The new angular cli uses angular.json and not .angular-cli.json聽 BUILD: Windows 10 angular-cli: 1.0.0-beta.24 node: 6.9.4 os: win32 x64 npm: 3.10.10 LOG for ng new command LOG for npm install -g -f angular-cli I cant start a new project in angular-cli, I get some errors while giving the command "ng ne

Angular 6 looks for angular.json instead of angular-cli.json.

You need to update your @angular/cli. Adding to the above answer

I did update all the package with the following commands and updated all dependencies too. So as to remove all compatibility issues with other packages.

If you are starting your app or demo app, follow this procedure. Be extra careful if you are doing this for production app.

npm install -g npm-check-updates
ncu -u
ng update @angular/cli
npm install

Install npm-check-updates

npm install -g npm-check-updates 

Use ncu to update your package.json

ncu for display

ncu -u for re-writing your package.json

Update your @angular/cli to modify your application to be compatible with angular 6

ng update @angular/cli 

and run npm install to update your packages

i got an error while running angular cli by using "ng serve"-"You , i got an error while running angular cli by using "ng serve"-"You have to be inside an angular-cli project in order to use the serve command." But i GitHub is home to over 50 million developers working together to host and review code, manage Please file a new issue if you are encountering a similar or related problem. Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces with Angular.

Re-Install @angular/cli

npm install @angular/cli

ng serve not working when install latest version of angular cli 路 Issue , Make sure you have the latest version of node.js and npm installed. My suggestion, create a new project with angular-cli 7, and copy its聽 ng new foo then ng can be served, but when i do ng new -lc foo then ng can be served, but when it fails and only way to fix it is to remove node_modules and install again with npm i or yarn. a bit about me (if it may help): yarn: 0.21.3 node: 7.7.1 angular-cli: 1.0.0-rc.0

Just use the official upgrade guide which will tell you what you need to do for your own particular needs:

https://update.angular.io/

Angular CLI update issues: Manually Update your Angular Project, So as I continue my struggle to get Angular CLI and my machine working in Run the following command to see what version you have setup in your NPM So when we generate a new project, we end up getting an older version of the angular core, and other Also, if we run ng serve to start our app, it will throw an error! After running 'ng serve' in an app created by 'ng new' I get this output from the console: `As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after.

That seems to be caused by different version of angular-cli is installed. I just created a new project, using new command, then copied across the src directory. then compiled them all successfully.

    ng new UX7

Angular Workspace: No Application for You!, This article explains how and when to use this new feature, which is The how and why of using the --create-application flag with Angular CLI to create a And hence, if we try to do something like ng build or ng serve , we get an error: Now that we have our Angular Workspace, we can add the library project to it. Create a new project and skip install. ng new my-app --skip-install Serve the application and configure permissions. sudo chown <username> -R my-app cd my-app mkdir node_modules chmod a+w node_modules npm install ng serve --open 馃憤

ng serve, ng doc 路 ng e2e 路 ng generate 路 ng help 路 ng lint 路 ng new 路 ng run 路 ng serve Builds and serves your app, rebuilding on file changes. ng serve < project > [ options ] Whitelist of hosts that are allowed to access the dev server. all builds make use of bundling, limited tree-shaking, and also limited dead code elimination. Published on Jul 14, 2018 Ng serve does not work because of package.json and Angular.json file configuration missing in Angular 6 version, to make it work we will uninstall the Angular Cli and

Use the Angular project template with ASP.NET Core, NET Core project to act as an API backend and an Angular CLI project to act dotnet new angular -o my-new-app cd my-new-app If you don't have the ng tool installed, run npm run ng instead. If your code (or some third-party library you reference) tries to use these APIs, you'll get an error during SSR. Generate components, routes, services and pipes with a simple command. The CLI will also create simple test shells for all of these. Easily test your app locally while developing. Make your code really shine. Run your unit tests, your end-to-end tests, or execute the official Angular linter with the breeze of a command.

Ng Serve Not Working - Angular.json Could not be Found, Before submitting new issues, have a look at issues marked with the type: faq label. Prerequisites. Both the CLI and generated project have dependencies that require Node 8.9 or higher, To run a locally installed version of the angular-cli, you can call ng commands You can find all possible blueprints in the table below:聽 Funnily enough, the problem that @maxime1992 is the same one that I have and I also have an identical project structure. Both frontend and backend dependencies being defined in the same package.json file, but as angular-cli belongs in the frontend, it's placed in that sub-directory.

Comments
  • Can you try an npm i and try again? It seems that you are not in the rigth folder anyway
  • did try again with npm i, but result with the same error...
  • I have tryed with ng update @angular/cli, now i get this error: This version of CLI is only compatible with Angular version 5.0.0 or higher. Please visit the link below to find instructions on how to update Angular.
  • You need run npm install --save-dev @angular/cli@latest @Niklas
  • I have also tried this and got this error Cannot destructure property createHash of 'undefined' or 'null'