0

I have been working with Angular Universal for a couple of weeks and I have noticed that many instances of Angular Universal have a server.ts document that is located at the root directory.

This server.ts file imports several TypeScript installations which are usually available from a /typings directory. However, there is one import library that always triggers an error when editing in the Atom IDE and disallows me to compile the file, only emit it:

import * as path from 'path';

Up until now, I have yet to figure out exactly where this 'Path' library is derived from. I have tried to install it using TypeScript itself:

typings install path

and I receive the following error:

typings ERR! message Unable to find "path" ("npm") in the registry.

Anyone familiar with this 'path' import reference and exactly where it is coming from?

Thanks.

1 Answer 1

1

path is a part of node.

So typings install node is the key! :)

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/node/node.d.ts#L2261

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a million! Ask and ye shall receive an answer to your liking :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.