After adding aurelia fetch client to my project i am getting the below exception when i am running au run
/node_modules/aurelia-fetch-client/dist/aurelia-fetch-client.d.ts(73,43): error TS2304: Cannot find name 'URLSearchParams'.
How to resolve this?
After i installed URLSearchParams following this link the error went away.
typings install github:RomkeVdMeulen/URLSearchParams --global --save
You have to import URLSearchParams from #angular/http
import {URLSearchParams} from '#angular/http';
Doc here
Related
I am working on an 1.14 SPFX web part, but inside the .ts file we are getting reference errors on almost all the libraries as shown in this picture:-
For example, on the first reference error "Cannot find module 'react' or its corresponding type declarations... i tried those commands:-
npm install react
npm install --save-dev #types/react
npm i #microsoft/rush-stack-compiler-3.9
but did not fix anything.. any advice on this please?
Thanks
I am trying to use react-loader-spinner package in my current project Here is the package, but it shows me an error.
When I imported (import "react-loader-spinner/dist/loader/css/react-spinner-loader.css";) in the main app.js the error showed in vs code.
I also followed the documentation nothing worked for me.
I attached the picture of the error
Here is the error
I also have the same problem as I installed the package as follows 'npm install react-loader-spinner --save'.I think there was some package version limitation. Try to install the package with the version below :
"npm install react-loader-spinner#4.0.0 --save" I presume this will resolve above error.
I installed react-awesome-query-builder from branch antd-3 but after import on react file, there is an error that says:
import {Query, Builder, Utils as QbUtils} from 'react-awesome-query-builder';
Error :
Failed to compile ./src/shared/queryBuilder/QueryBuilder.js
Module not found: Can't resolve 'react-awesome-query-builder' in 'D:\manshoor_ui\src\shared\queryBuilder'
This module is added to package.json and node_modules but there is this error. I installed by this command:
npm install --save ukrbublik/react-awesome-query-builder#antd-3
So what might be wrong here?
According to github docs documentation for that package, it's supposed to be installed like this:
npm i react-awesome-query-builder
And then you import it like this:
import {Query, Builder, Utils} from 'react-awesome-query-builder';
Upon running npm start by React DOM and Console return the following:
Failed to compile.
../node_modules/react-popper/lib/Manager.js
Module not found: Can't resolve 'react' in >'C:\Users\B\Desktop\Programming\WebDev\ProjectFile\node_modules\react-popper\lib'
I have already attempted to run npm install react-popper, npm install react, and deleted the ...\node_modules\react-popper file and reinstalled react-popper.
Consistently the same error has applied. Is this something that is possible to solve through node?
I am getting to grips with Typescript. I am having issues with using fs.
The following code produces this error: Ingest.ts(4,21): error TS2307: Cannot find module 'fs'.
// <reference path="typings/node/node.d.ts"/>
'use strict';
import * as fs from "fs";
console.log("hi matt");
var data = fs.readFileSync('matt.txt');
console.log(data);
When I change the first line to /// rather than //
I get this error:
typings/node/node.d.ts(512,16): error TS2304: Cannot find name 'IterableIterator'.
typings/node/node.d.ts(514,13): error TS2304: Cannot find name 'IterableIterator'.
typings/node/node.d.ts(515,15): error TS2304: Cannot find name 'IterableIterator'.
Prior to trying these I had done these steps:
npm install -g typescript
npm install -g tsd#next
cd <project folder>
tsd install node
tsc -init
tsc Ingest.ts
Node v.6.4.0 and tsc v.1.8.10 on OSX Yosemite
OK, a few things here. TSD is done, use typings instead npm install -g typings. With typings, you need to know the repository for the type files, it will be one of the columns returned when you do a typings search <package>. I've had most of my type files come from the DefinitelyTyped repo. To install a package from there, you do typings install dt~<package>.
Second, you error with the IterableIterator, I've already reported this to the Node type team, they are working on a resolution for it, but you can get around it in the mean time by installing the core-js types typings install dt~core-js --global