Git Product home page Git Product logo

Comments (9)

DeborahK avatar DeborahK commented on June 9, 2024 1

Is it possible you are not in the appropriate directory when you execute the command? You need to be in the folder containing the package.json file.

from angular-gettingstarted.

elfworld avatar elfworld commented on June 9, 2024 1

Sorry for note getting back to you before now, but I didn't have the chance to check it before now.

I can't believe that I hadn't seen tat error on top of all the red ERR's.

Everything works just fine now. Thank you very much!

from angular-gettingstarted.

elfworld avatar elfworld commented on June 9, 2024

I'm starting it from the same folder that I've always started it from. And package.json is in that folder.

I downloaded all the files from your github again, and installed it on another directory on my computer. I did npm install and the npm start. Everything worked just fine. So something must have happened to my old installation.

I did a test:

I slowly copied files from the old installation where I've added and changed files while following the course module (the installation that doesn't work anymore) over to the new one. After copying each file I did npm start again. When I had copied over the file called product.service.js, the error also started to appear in the new installation. I've no idea why. It could be a coincidence of course.

Seems like I just have to start all over again. Or use the FINAL-folder for the rest of the course. If you don't have any other suggestions

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

When you ran npm start ... if you look after the command in the console, are there any errors listed before the info you posted above? Some syntax errors will prevent it from starting.

Also, the service should be product.service.ts, not .js

from angular-gettingstarted.

elfworld avatar elfworld commented on June 9, 2024

There's both a .ts and a .js file called product.service.

Here's the complete output when writing npm start:
image

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

Ah! You have 3 syntax errors. They are shown immediately above the first npm error line. It even gives you the line number and character in that line that is causing the errors.

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

Were you able to resolve your syntax errors? Can we close this?

from angular-gettingstarted.

sguindi avatar sguindi commented on June 9, 2024

Hi im having the same issues:
npm start

[email protected] start /home/sharonco/projects/angular/apmFinal
tsc && concurrently "tsc -w" "lite-server"

node_modules/rxjs/Subject.d.ts:24:5 - error TS2416: Property 'lift' in type 'Subject' is not assignable to the same property in base type 'Observable'.
Type '<T, R>(operator: Operator<T, R>) => Observable' is not assignable to type '(operator: Operator<T, R>) => Observable'.
Type 'Observable' is not assignable to type 'Observable'.
Type 'T' is not assignable to type 'R'.

24 lift<T, R>(operator: Operator<T, R>): Observable;
~~~~

node_modules/typescript/lib/lib.d.ts:105:14 - error TS2300: Duplicate identifier 'PropertyKey'.

105 declare type PropertyKey = string | number | symbol;
~~~~~~~~~~~

typings/globals/core-js/index.d.ts:3:14 - error TS2300: Duplicate identifier 'PropertyKey'.

3 declare type PropertyKey = string | number | symbol;
~~~~~~~~~~~

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start: tsc && concurrently "tsc -w" "lite-server"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/sharonco/.npm/_logs/2019-07-24T12_53_45_029Z-debug.log

I have no idea how to continue

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

Please ensure you have downloaded the current code from this github folder. The error message you are seeing above is from a very old version of the code.

if you look in the package.json file, you should see this:

  "scripts": {
    "ng": "ng",
    "start": "ng serve -o",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },

And not this:
tsc && concurrently "tsc -w" "lite-server"

That has not been in the code for almost 2 years.

There are numerous copies of my code in other repositories on github that other developers have copied and not kept up to date.

Let me know if that resolves your issue.

from angular-gettingstarted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.