Angular - Problems with Flex Layout and node_modules

When I attempted this command:

npm i @angular/flex-layout

it didn’t create the flex-layout folder. On the advice of a forum post, I deleted node_modules and package-lock.json and then I attempted to issue:

npm install

But I can’t find node_modules and my build attempt returns an error 404.

What am I missing here? Thank you for your feedback.

Actually, I am now closer to my real problem. It is not with the command:

npm i @angular/flex-layout

The problem is in my subsequent effort to modify the file src/app/app.module.ts. Here are my additions:

import { FlexLayoutModule } from '@angular/flex-layout'

imports: [..., FlexLayoutModule ],

I modified this file exactly according to the instructions in the book “Angular for Enterprise-Ready Web Applications”. I get the error:

CurrentWeatherComponent.html:9 ERROR NullInjectorError

A Stack Overflow post advises me to check my app module for the following:

import { HttpClientModule, /* other http imports */ } from "@angular/common/http";

    // ...other declarations, providers, entryComponents, etc.
    imports: [

But I had already done this and it doesn’t solve the problem. Can you advise? Thank you.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.