Tag Archives: Applet

[Solved] ERROR Error: No module factory availabl at Object.PROJECT_CONFIG_JSON_NOT_VALID_OR_NOT_EXIST ‘Error

1. Use wechat one-click packaging tool report the following error:

ERROR Error: No module factory available for dependency type: CssDependency

‘error: please check project.config Whether JSON exists and is valid (code 19) error: please check

2. Solutions

Hbuilder x development tools cannot be placed on the same disk as project files. The above errors will occur. If the development tools are placed on disk D and the project files are placed on disk e or disk F, the above errors will not be reported

[Solved] HBuilder Error: Cannot read property ‘forceUpdate‘ of undefined

Using the project developed by HBuilderX, WeChat develop tool report an error:

Cannot read property ‘forceUpdate’ of undefined

The solution is shown in the figure:

In the project directory, find manifest.json – WeChat applet configuration – configure “WeChat applet AppID”

Open the developer tool, view the corresponding appid, fill in the upper part, and refresh the developer tool.

If you continue to report this error, restart hbuildx and wechat developer tools after configuration, and re run the project.

 

Chrome Broswer V98 Can not manually add cookies locally, refresh cannot be retained, and the cookie item is red

Solution for Chrome 91 after SameSite by default cookies were removed, solution for cross-domain POST requests in Chrome that can’t carry cookies

Yesterday after work to start the project, Google Chrome automatically upgraded to version 98, because the previous project is required to manually add a cookie in the local development debugging, now it is impossible to manually add a cookie, and the high version removed SameSite by default cookies, resulting in the previous method can not be used, manually set after the cookie also reported red, as follows:

Now just open Chrome and visit the address chrome://flags/ and search for Partitioned cookies and change the setting to Enabled, restart the browser, manually adding cookies will be retained and will not b

How to Fix Taro SwipeAction Not Working Issue

Invalid reason:

Because two attributes of the official document are not written, and we have not written them, it will not take effect
1 The maximum sliding distance of maxdistance slider is generally the number of buttons multiplied by the button width
2 Areawidth component width (if no reference causes the component occupancy width to be 0, the page will not be displayed)

be careful:

Here, the width in option must use PX, if you use rpx, there will be UI problems on different devices, maxDistance= the width length of two options, maxDistance is the type of number

Correct code:

<AtSwipeAction
  maxDistance={140} // Button width * number of buttons
  areaWidth={Taro.getSystemInfoSync().windowWidth * 1} //Dynamically get the width of different devices
  autoClose //click the button to close it automatically
  onClick={(option, btnIndex) => { }} //Click to cancel Triggered after deleting the button, one parameter is the currently clicked option item, the second parameter is the index of the button 0 1
  options={[
    {
      text: 'cancel',
      style: {
        justifyContent: 'center',
        width: '70px',
        padding: 0,
      }
    },
    {
      text: 'Delete',
      style: {
        justifyContent: 'center',
        width: '70px',
        padding: 0,
      }
    }
  ]}>
  <View>
    Content
  </View>
</AtSwipeAction>

Error: EEXIST file already exists open [How to Solve]

problem

Mobile compilation Preview

If an error is reported: error: eexist file already exists open/users/dream/library/Application Support/wechat developer tool/50a7d9210159a32f006158795f893857/weapdest/1613806926253/pages/demofile/demofile js

solution:

Update the applet development tool and upgrade to the latest version 1.03 – < 1.05 >

Vue Install less Error: While resolving: [email protected]

Vue Install  less Error: While resolving: [email protected]

F:\Workspace\project\hhhs\wudslyh5\big-data\hblvbigdata>npm install less less-loader --save-dev
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^4.0.0" from @intervolga/[email protected]
npm ERR!   node_modules/@intervolga/optimize-cssnano-plugin
npm ERR!     @intervolga/optimize-cssnano-plugin@"^1.0.5" from @vue/[email protected]
npm ERR!     node_modules/@vue/cli-service
npm ERR!       peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/[email protected]
npm ERR!       node_modules/@vue/cli-plugin-babel
npm ERR!         dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR!       4 more (@vue/cli-plugin-eslint, @vue/cli-plugin-router, ...)
npm ERR!   peer webpack@"^4.0.0 || ^5.0.0" from @soda/[email protected]
npm ERR!   node_modules/@soda/friendly-errors-webpack-plugin
npm ERR!     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/[email protected]
npm ERR!     node_modules/@vue/cli-service
npm ERR!       peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/[email protected]
npm ERR!       node_modules/@vue/cli-plugin-babel
npm ERR!         dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR!       4 more (@vue/cli-plugin-eslint, @vue/cli-plugin-router, ...)
npm ERR!   19 more (@vue/cli-plugin-babel, @vue/cli-plugin-eslint, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev less-loader@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^5.0.0" from [email protected]
npm ERR!   node_modules/less-loader
npm ERR!     dev less-loader@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Administrator\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-11-30T09_15_59_630Z-debug.log

Solution:

Error reason: the installed version is too high

Solution:

Delete the previous version: NPM uninstall less loader download the specified version: NPM install less- [email protected] -D

If an error is still reported, the file node_Modules can be removed, Download NPM install again

Pytorch Error: runtimeerror: expected scalar type double but found float

The reason for this problem may be that the data type of tensor is wrong, it may be the wrong type of input X in the backpropagation, or the wrong data type in the training and testing process. If it is the backpropagation process, it depends on which layer of neural network has the problem, and add x = x.to (torch. Float32) in front of which layer, For example, this problem occurs in the first layer of neural network. For example, this problem occurs in the first layer of convolution. The solution is as follows:

If this problem occurs in the training or test model, the solution is as follows:

It is also possible that the type of labels is wrong during training or testing. The solutions are as follows:

The uni app references the vant component and reports an error unclosed bracket when compiling

report errors:

Module build failed (from ./node_modules/postcss-loader/src/index.js):
10:26:54.652 SyntaxError
10:26:54.653 (45:193) Unclosed bracket

global search

https://img.yzcdn.cn/vant/vant-icon-d3825a.woff

Locate the index.wxss file location  

...src:url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2) format("woff2"),url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff) ......

Add a space after the comma of… (“woff2”), URL (HTTPS:…)

...src:url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2) format("woff2"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff) ......

[Solved] Wepy build watch Error: ERR! Parse WePY config failed. Are you trying to use

The specific error is
[22:54:56] err! Parse WePY config failed. Are you trying to use WePY 2 to build WePY 1 project?
[22:54:56] ERR! Unexpected type: plugins expect a Array

This is because
the version of wepy used in the current project is 1. X, while the version of wepy on the computer is 2, X

NPM install wepy cli – G command installs version 1. X
NPM install @wepy cli – G command installs version 2. X
the difference is@

Solution:

Locate C:\users\XX\appdata\roaming\NPM\node_Modules folder
delete the @wepy folder, and then execute NPM install wepy cli – G

An error occurs when cartopy library uses the coastlines() command

Reinstall the system, resulting in the need to reconfigure python. Python version 3.7.9 and cartopy version 0.19.0.post1 are used

Example code:

import numpy as np
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
from cartopy.mpl.ticker import LongitudeFormatter,LatitudeFormatter
dlon,dlat=60,30
xticks=np.arange(0,360.1,dlon)
yticks=np.arange(-90,90.1,dlat)
fig=plt.figure(figsize=(6,5))
ax=fig.add_subplot(1,1,1,projection=ccrs.PlateCarree(central_longitude=120))
ax.coastlines()
gl=ax.gridlines(crs=ccrs.PlateCarree(),draw_labels=False,linewidth=1,linestyle=":",color="k",alpha=0.8)
gl.xlocator=mticker.FixedLocator(xticks)
gl.ylocator=mticker.FixedLocator(yticks)
ax.set_xticks(xticks,crs=ccrs.PlateCarree())
ax.set_yticks(yticks,crs=ccrs.PlateCarree())
ax.xaxis.set_major_formatter(LongitudeFormatter(zero_direction_label=True))
ax.yaxis.set_major_formatter(LatitudeFormatter())
plt.show()

The first time you use this command, you need to download the corresponding coalistline file, but there is a problem with the website in the program and you can’t download it. You need to download the file yourself on the earthnatural official website.

 

Place the file in C: \ users \ XXXX \. Local \ share \ cartopy \ shapefiles \ natural_ Under the earth \ physical path, if the program still reports an error when running, you need to delete the path (. Local \ share \ cartopy \ shapefiles \ natural_earth \ physical) and run it again. After generating the path of the same path, copy the downloaded physical into physical, run it again, and no error will be reported. Code reference Python meteorological drawing tutorial (VII) — cartopy