0

This is a popular question with several resources on the web to resolve. However after trying multiple solutions none have worked. I am getting an error which says Cannot Find Module './neuralnet'.

Typescript Ctrl

File Paths

I have tried some of the solutions listed here

How do I resolve "Cannot find module" error using Node.js?

including npm install and npm install --save neuralnet and nothing has worked.

Any suggestions would be great.

Community
  • 1
  • 1
RyeGuy
  • 2,803
  • 5
  • 26
  • 47

1 Answers1

1

The way you have it setup -- in home.component.ts -- your import { NeuralNetService } from './neuralnet.service', is looking in the current directory, which is in app/components/home. This clearly isn't where it is.

Use import { NeuralNetService } from './../../neuralnet.service' and it will properly resolve.

Jaron Thatcher
  • 764
  • 2
  • 7
  • 23
  • (stepped out for lunch).. yeah hard to tell the directories sometimes when you can't click around, glad it worked out for you :) – Jaron Thatcher Apr 04 '17 at 18:56