Tag Archives: Ionic

Ionic Error: Failed to load resource [How to Solve]

After a day, I found that the code was wrong

The reason for the error is that such a definition is used in the TS file

Data: [] = [‘high tech Zone’, ‘Economic Development Zone’, ‘other parks’]

The error lies in the type of this definition, which cannot be []. If it is modified to any, there will be no problem

Data: any = [‘high tech Zone’, ‘Economic Development Zone’, ‘other parks’]

Drunk


I don’t know what happened. Suddenly ionic reported an error: failed to load resource   The project cannot be started

The final solution to this problem is to clone the GIT project again . So I didn’t find the reason for the mistake today

Document resolution process

It is found that these missing files are in the build directory

Therefore, execute the build command, but the error is as follows:

I didn’t understand this error and couldn’t find a solution, so I wanted to delete node first_Modules, run the NPM install command again after installing

 

result error: downloading from GitHub timed out

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node":

connect ETIMEDOUT 54.231.49.194:443

Many solutions have been tried here and can be downloaded at last

But when you return to execute the build command, you still report an error and despair

[17:05:23]  ionic-app-script task: "build" 
[17:05:23]  Error: Debug Failure. 
Error: Debug Failure. 
    at typeToString (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:28777:22)
    at reportRelationError (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34714:34)
    at isRelatedTo (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34860:21)
    at checkTypeRelatedTo (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34697:26)
    at checkTypeAssignableTo (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:34398:20)
    at checkVariableLikeDeclaration (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:44884:21)
    at checkPropertyDeclaration (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:43383:13)
    at checkSourceElement (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:46700:28)
    at Object.forEach (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:1506:30)
    at checkClassDeclaration (E:\Workspaces\WebStormProject\guizhouApp\node_modules\typescript\lib\typescript.js:45765:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     E:\jiashubing\npm_cache\_logs\2017-12-28T09_05_23_905Z-debug.log

View Code

 

Ionic reported an error when creating a new project — it has been solved

1 error reporting, such as picture :

I haven’t responded for a long time, which is stuck. First, my network is not good; Then they began to report a series of problems, such as start is not an instruction, gradle file error, etc

On the Internet, it is often said that there is a problem with the version of ionic or Cordova. In other words, there is a problem with the locally installed ionic2 and the creation project of ionic1

No, the reason is detailed

2 reason:

a. Let’s talk about the version first. As long as you have installed node NPM JDK Cordova ionic and other environment configurations, and each environment can be executed, in the sense of program, the environment has been configured successfully

As for the failure to execute the ionic start myapp tabs command, unless an error is reported, which obviously means that the version of an environment is backward, it is not the reason for the version

b. As for the version of ionic2, we mostly install the version above ionic2. The instruction of ionic2 to create the project: ionic start myapp tabs — V2

The package of 2 can also be created successfully by using this instruction. The package of ionic1: ionic start myapp tabs — V1 can also be created successfully by imitating this instruction( (not recommended)

c. this is the key to solving the problem:

It seems that the essence is the network problem, because when this problem occurs, a node will appear under our project_Modules file, which is the dependent resources of the project

When NPM is loaded with network problems or walls, it is easy to load incompletely, resulting in a series of problems; The solution is to use Taobao image to download dependent resources:

First, execute ionic start myapp tasks — skip NPM   Prevent NPM execution

         When there is no error in the returned value, continue to perform the following operations (not shown in the figure above)

Re execute: cnpm install — save   Use cnpm to avoid network or wall (Note: be sure to enter the project path and execute this command: CD myapp)

             If everything goes well, you won’t report the previous errors again. If you don’t report any errors, it means success

Then execute: ionic serve to see if it can run normally;  

Well, if everything goes well, it will be solved in this way. I wish you a long way. These are basically the mistakes. Remember to ensure that your environment has been successfully installed!    

 

[Solved] Ionic Error: Could not find gradle wrapper within Android SDK.

 

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.

Go to the Android SDK directory and make sure there is no tools/templates/gradle directory

Maybe it’s the reason after Android studio upgraded to 3. X

Copy the templates in Android studio to tools

The path of templates in Android studio

Then go to the project directory

Execute ionic platform RM Android

Execute ionic platform add Android

Problem solving