-
Notifications
You must be signed in to change notification settings - Fork 74
Modules Not Found in Angular CLI Application #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@patrimart ah yes, we should add a section to the readme about aliasing I think you should be able to add this to your {
/* ... */
"baseUrl": ".", // This must be specified if "paths" is.
"paths": {
"ix/*": ["node_modules/ix/targets/es5/cjs"]
}
} I'll test this out later tonight and update this ticket with what I find. Thanks! |
That suggestion didn't work for me. I tried every path combo I could think of. I'd like this to work without resorting to |
A workaround that is letting me develop with IxJS is as follows... In root of project, Add this to
Perhaps including the |
@patrimart ah, thanks for the suggestion. I'll try this out locally and work out any impact it has on the build. |
@patrimart update: I can get it working fine for normal TS projects via a "paths" entry, but not within angular-cli (v1.3.1). It looks like we might be running into angular/angular-cli#7341 here. In the meantime, I'm going to investigate the right way to publish the TS source (be that as @reactivex/ix-ts, or including the |
@patrimart good news! as of @angular/[email protected], I'm able to get Ix aliased via {
"compilerOptions": {
"importHelpers": true, /* <-- optional but recommended */
"noEmitHelpers": true, /* <-- optional but recommended */
"downlevelIteration": true,
"paths": {
"ix/*": ["../node_modules/@reactivex/ix-ts/*"]
},
"lib": [
"esnext.asynciterable" /* <-- in addition to any other "lib" entries you have */
]
}
} |
@patrimart can you validate this works for you, so I can close the issue? |
I definitely will this evening, if you can wait. |
I finally tested this. For the given issue, this solves the problem. However, there are a couple of side-effects.
I found a workaround for #2 by adding the following to my
|
So this issue is a bit tricky. Off the top of my head, we have a few options here:
4 would be ideal, but I'd settle for 1. Thoughts? @mattpodwysocki @kwonoj @saneyuki |
Converting ix's structure to like rxjs's one? |
@saneyuki sort of. rxjs copies the source files into a subdirectory, and runs The IxJS publish step is different as well. We publish the top-level folder as the Except now it seems VSCode is having trouble finding the types for Move the -ix
Ix.ts
package.json
./add/iterable/of.ts
# etc.
./targets/es5/cjs
Ix.js
package.json
# etc. |
@patrimart we just published #45 as |
Within an Angular/CLI application (in VS Code), ES imports cannot resolve the modules. For example, these imports fail...
However, this import does work...
That, sadly, does not give me access to 'ix/iterable' functions.
The text was updated successfully, but these errors were encountered: