Closed alienlike closed 7 years ago
Oh gosh, ng2-ol is a symlink to src ! Symlinks and windows do not play well along.
One way to fix it would be to use relative paths, i.e. ../../../dist/
but I'm not a big fan of this solution as relative paths are keen to create weirds bugs. I'd prefer the example (which is an angular-cli project) to depend on the angular2-openlayers NPM package.
Opinions ?
Aha. I wondered what ng2-ol was exactly.
My concern with using the NPM package as opposed to a relative path is that the NPM package will not necessarily be current with the cloned repo.
@alienlike exactly. This argument goes in favour of relative paths. @FallenRiteMonk opinion?
@alienlike sorry the one with the symlink goes on me.
@quentin-ol I used to have this as relative path, but the reason I changed it to the symlink was due to a error when running the example with ng serve --aot
as the compiler wouldn't compile modules out side the example/src dir, because it would handle it like modules from node_modules folder and they have to be already compiled with ngc in order for aot to work.
In my point of view there are two solutions:
@FallenRiteMonk I had the same issue you described regarding making ngc find the dist files outside of the example directory. The second solution is somewhat misleading for someone interested in the library.
I believe the best option is to make the example rely on the NPM package. You're right that this is prone to mishaps though. If that bites us too often, we'll reopen this issue and find another way
I am trying to run the example app on a Windows 7 box. I used the following commands:
Output of
ng serve
follows: