Comments (9)
Could you specify more context regarding how you ended up with the above error message? It does not replicate for me. The index.ts
file is in the root directory of the project, i.e. one level above /config
.
And I have no occurrence of the error you describe.
I am working on Windows 10 w/ VSCode 1.12.1 locally. Similarly, Travis builds without issues.
from d3-ng2-service.
I use d3-ng2-service package in Angular2 app. I installed it with npm. Visual Studio Code (1.12.1 on Win10) then shows me this error message:
file: 'file:///c%3A/xxxx/node_modules/ngx-cookie/tsconfig.json'
severity: 'Error'
message: 'File 'c:/xxxx/node_modules/ngx-cookie/index.ts' not found.'
at: '1,1'
source: 'ts'
It's benign, nothing's failing in my app. It shows up in the "Problems" panel.
I have just tried "npm install d3-ng2-service" in an empty folder. Today this ends up installing [email protected]. If I check node_modules\d3-ng2-service folder I'll find index.d.ts there, but not index.ts.
Hope this helps.
from d3-ng2-service.
A couple of things: First of, your latest error message actually refers to an ngx-cookie
package.
As for the d3-ng2-service, sorry for not realizing right away that you were referring to the installed package built for consumption, rather than the cloned/forked package.
The package is distributed as a JS ES2015 module with accompanying d.ts
for definitions, i.e. it is already compiled from TypeScript. So, I suspect in your project setup (VS Code settings) there is an issue with the compilation scope of your Angular app (tsconfig.json
inclusions/exclusions/files and the like). Possibly it tries to "re-compile" dependencies and therefore runs into the issue with the missing index.ts
files for both d3-ng2-service
and ngx-cookie
?
Let me know, if that idea gets you on the right path. I do not believe, the issue lies with this service, but if the hint does not do it, I would need a public repo which reproduces the error to check.
from d3-ng2-service.
Oops, copied wrong line... Yes, both packages have this issue in my VS Code project.
Thanks for your suggestion, I modified a few files to resolve this issue and problem went away.
I excluded node_modules
in tsconfig.json
in my app, and for a good measure I added **/node_modules/**
to workspace settings for files.exclude
and tslint.exclude.
After reopening my project VS Code is no longer scanning/complaining about neither d3-ng2-service nor ngx-cookie lib.
from d3-ng2-service.
Glad it worked. I will close the issue here. 💃
from d3-ng2-service.
Maybe I spoke too soon. While the error is initially gone after restarting VS Code, I think I have a way of triggering it. All it takes is to go to my source file with a reference to the D3Service
and press F12 (browse symbol) to show symbol declaration. As soon as d3.service.d.ts
file is open, familiar error pops up:
file: 'file:///c%3A/xxxx/node_modules/d3-ng2-service/tsconfig.json' severity: 'Error' message: 'File 'c:/xxxx/node_modules/d3-ng2-service/configs/../index.ts' not found.' at: '1,1' source: 'ts'
If I really want to silence this error, I need to create empty index.ts
file inside node_modules\d3-ng2-service
.
It appears intellisense engine in VS Code goes after tsconfig.json
in node_modules\d3-ng2-service
, finds node_modules\d3-ng2-service\configs\base.json
and tries to locate missing index.ts
that base.json refers to.
I couldn't find any VS Code settings to configure intellisense.
from d3-ng2-service.
I am reopening and will push a fix with a patch release right after. The tsconfig
-related files made their way into the npm package unnecessarily. I recently changed the build pipeline and did not updated the npm .npmignore
file.
@mikekov Thanks for the persistence 👍
from d3-ng2-service.
With Release 1.10.2 the issue is resolved.
from d3-ng2-service.
Thank you very much for your prompt action. Yes, I can confirm that VS Code is happy now with package 1.10.2 when browsing symbols. No more error messages.
from d3-ng2-service.
Related Issues (20)
- [BREAKING CHANGE] Update Major Release to Align with D3 v5
- Problem with d3.geo HOT 2
- traceur 404 (Not Found) Error HOT 1
- [d3-contour] Update to Minor Version 1.2
- Unresolved variables and methods HOT 7
- Type 'SVGPathSeg' is not assignable to type 'EnterElement'. Property 'ownerDocument' is missing in type 'SVGPathSeg'. HOT 5
- Update d3-geo to 1.10 HOT 1
- Property 'getBoundingClientRect' does not exist on type 'BaseType'. Property 'getBoundingClientRect' does not exist on type 'Window'.
- Update Angular dependencies HOT 1
- [d3-interpolate] Update to Minor Version 1.2
- [d3-color] Update to Minor Version 1.2
- [d3-format] Update to Minor Version 1.3
- upgrade to angular 6 HOT 14
- How to read a JSON file and load the data into a Treemap? HOT 1
- Load svg from File
- has no exportted member 'ThresholdArrayGenerator'. HOT 15
- Support for Angular 7 HOT 2
- Include d3-floorplan
- Failed AOT compilation HOT 2
- No Explanation as WHY we need a D3 service HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-ng2-service.