Skip to content
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

Ping Lib is not recognized #29

Closed
Venmathi2510 opened this issue Apr 26, 2019 · 1 comment
Closed

Ping Lib is not recognized #29

Venmathi2510 opened this issue Apr 26, 2019 · 1 comment

Comments

@Venmathi2510
Copy link

I did installed the ping library and I tried to import and use the same. But when I import it is not being accepted and shows the following error on hover.

image

Could not find a declaration file for module 'ping.js'. 'c:/Users/vn509wj/Desktop/workspace/ui-retaillink-react/node_modules/ping.js/index.js' implicitly has an 'any' type.
  Try `npm install @types/ping.js` if it exists or add a new declaration (.d.ts) file containing `declare module 'ping.js';`ts(7016)
Could not find a declaration file for module 'ping.js'. 'c:/Users/vn509wj/Desktop/workspace/ui-retaillink-react/node_modules/ping.js/index.js' implicitly has an 'any' type.

Below is the module and plugin in my web pack
``plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new CopyWebpackPlugin([
{ from: 'src/libs/js', to: 'vendor/d3'}
]),
new CopyWebpackPlugin([
{from: 'src/custom', to: 'vendor/custom'}
]),
new HtmlWebpackIncludeAssetsPlugin({
assets: ['vendor/d3/d3.v3.min.js','vendor/d3/d3.tip.v0.6.3.js'],
append: false,
publicPath: 'rl-portal/'
})

],
module: {
loaders: [
{test: /.d.ts$/, include: path.join(__dirname, 'src'), loader: 'babel', query: { plugins: ['transform-decorators-legacy'], presets: 'es2015'}},
{test: /.js$/, include: path.join(__dirname, 'src'), loader: 'babel', query: { plugins: ['transform-decorators-legacy'], presets: 'es2015'}},
{test: /.jsx?$/, loader: 'babel', exclude: /node_modules/, query: { plugins: ['transform-decorators-legacy', 'transform-es2015-destructuring', 'transform-object-rest-spread'], presets: ['es2015', 'react']}},
{test: /(.css)$/, loaders: ['style', 'css?sourceMap']},
{test: /.less$/, loader: "style!css!less"},
{test: /.eot(?v=\d+.\d+.\d+)?$/, loader: "url?limit=100000&mimetype=file"},
{test: /.(woff|woff2)$/, loader: "url?prefix=font/&limit=50000"},
{test: /.ttf(?v=\d+.\d+.\d+)?$/, loader: "url?limit=20000&mimetype=application/octet-stream&name=fonts/[hash].[ext]"},
{test: /.svg(?v=\d+.\d+.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml&name=images/[hash].[ext]"},
{test: /.json$/, loader: 'json-loader'},
{test: /.(png|jpg|gif)$/,loader: 'url?limit=25000&name=images/[hash].[ext]'},
{test: /.pdf$/,loader: 'file?name=[name].[ext]'}
]
},``

@alfg
Copy link
Owner

alfg commented Apr 27, 2019

Is this a Typescript warning? I don't currently use Typescript or have any type declarations in this project.

@alfg alfg closed this as completed Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants