I have Installed npm install pdfjs-dist i want to load PDF on the browser on mobile phones. However I am getting the below error. How can i resolve this?
Failed to compile.
./node_modules/pdfjs-dist/build/pdf.js
SyntaxError: C:\node\node_modules\pdfjs-dist\build\pdf.js: Missing class properties transform.
3520 |
3521 | class PixelsPerInch {
> 3522 | static CSS = 96.0;
| ^^^^^^^^^^^^^^^^^^
3523 | static PDF = 72.0;
3524 | static PDF_TO_CSS_UNITS = this.CSS / this.PDF;
3525 | }
Related
When I follow the Custom Tailwind Config insctructions found here https://electron-react-boilerplate.js.org/docs/styling#without-custom-tailwind-config the app breaks.
I get this error
ERROR in ./node_modules/tailwindcss/tailwind.css (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[3]!./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/tailwindcss/tailwind.css)
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
SyntaxError
(2:7) C:\Users\User\leona_repo\SP\tw_bp\your-project-name\node_modules\tailwindcss\tailwind.css Unknown word
1 |
> 2 | import API from "!../style-loader/dist/runtime/injectStylesIntoStyleTag.js";
| ^
3 | import domAPI from "!../style-loader/dist/runtime/styleDomAPI.js";
4 | import insertFn from "!../style-loader/dist/runtime/insertBySelector.js";
# ./node_modules/tailwindcss/tailwind.css 8:6-255 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-225 83:0-225 84:22-29 84:33-47 84:50-64 61:4-74:5
# ./src/renderer/App.tsx 5:0-34
# ./src/renderer/index.tsx 5:0-24 8:17-20
They said they fixed it in this issue thread but does not work for me
https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/3067
I'm trying to create sound player in my react native app, but I was trying to install a lot of various sound packages, and all of them are giving me pretty same issues, like this:
Without them, project compiles and runs fine.
UPD:
Added arrors as text:
ERROR in ./node_modules/react-native-sound/sound.js
Module not found: Error: Can't resolve 'react-native/Libraries/Image/resolveAssetSource' in '/mnt/c/users/user/desktop/adalo/audio_player/my-component/node_modules/react-native-sound'
# ./node_modules/react-native-sound/sound.js 7:25-83
# ./src/components/CustomAudioPlayer/index.js
# ./index.js
# ./dist/input/runtime.js
ERROR in ./node_modules/react-native/Libraries/Image/resolveAssetSource.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /mnt/c/users/user/desktop/adalo/audio_player/my-component/node_modules/react-native/Libraries/Image/resolveAssetSource.js: Unexpected token, expected "from" (19:12)
17 | const {pickScale} = require('./AssetUtils');
18 |
> 19 | import type {ResolvedAssetSource} from './AssetSourceResolver';
| ^
20 |
21 | let _customSourceTransformer, _serverURL, _scriptURL;
22 |
UPD2:
Running command react-native info
I have a react app created with create-react-app
I have imported a library I created using class syntax
I am getting the following error:
SyntaxError: ....RequestBody.js: Missing class properties transform.
35 |
36 | class RequestBody {
37 | [FIELD_NAMES.INTERFACE_NAME] = "PRE_SALE_CHECK";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 | [FIELD_NAMES.FROM] = "DAVE SHEEPLE";
39 | [FIELD_NAMES.TO] = "MISTER JONES";
40 |
I have tried installing babel-plugin-transform-class-properties
and some other similar suggestions but none worked.
the project itself runs perfectly.
assistance is appreciated
I am working to migrate a React app to the latest v17.x version (from 16.13.0).
However I am getting parsing errors on the typescript files when I upgrade React (the app uses javascript mostly, but some files were later added in typescript).
e.g.
src\components\data\Assets\FYAsset.ts
Line 2:11: Parsing error: Unexpected token
1 | export class FYAsset {
> 2 | private apiData: Object | undefined; // the res data, as received from the API
| ^
3 |
4 | private id: number | undefined;
5 | private providerId: number | undefined;
src\components\data\Users\FYUser.ts
Line 5:19: Parsing error: Unexpected token
3 |
4 | export class FYUserConstants {
> 5 | static readonly USERGROUPID_ADMIN = 1;
| ^
6 | static readonly USERGROUPLABEL_ADMIN = "ADMIN";
7 | //
8 | static readonly USERGROUPID_EXPERT = 2;
The old app uses the following versions (which work fine):
react-scripts v3.4.0
react/react-dom v16.13.0
typescript v3.8.3
For the migration, the errors appear when I move over to react-scripts v4.0.1 and react v17.0.1. I tried upgrading typescript to v4.1.3 but that didn't change anything.
Again, everything works fine in the previous branch. Could you suspect what causes the issues?
Thanks
The problem was solved by deleting the .eslintcache file that was carried over from the legacy project.
I am doing RIA application with QooXDoo, I want to use Dialog like windows to prompt & notify the user.
I have used dialog contrib from qooxdoo. But i got following error when i am trying to run
dialog.Dialog.warning( "I warned you!" );
Error in property decorator of class dialog.Alert in method setDecorator with incoming value 'shadow-popup': Is invalid!
I did added Dialog contrib in "config.json" file as follows.
"libraries" :
{
"library" :
[
{
"manifest" : "../qx-contrib-Dialog-master/Manifest.json"
}
]
}
Can any one guess what is the problem?
Thanks in advance.
Can you give some context?
Which version of qooxdoo and qx-contrib-Dialog are you using?
Which type of application are you developing (contribution|desktop|inline|mobile|native|server|website)?
Do you get an error message when running ./generate.py source?
I'm not sure what your problem is but when starting from scratch everything works for me (using qooxdoo-2.1, creating a desktop app and using the current head of the master branch from qx-contrib-Dialog):
$ cd workspace
$ wget/unzip => qooxdoo-2.1-sdk/ // I've already done that before...
$ ./qooxdoo-2.1-sdk/create-application.py -n stackoverflow
$ git clone https://github.com/cboulanger/qx-contrib-Dialog.git
file system at this moment:
workspace/
|-- qooxdoo-2.1-sdk/
| |-- application/
| |-- component/
| |-- create-application.py
| `-- ...
|-- qx-contrib-Dialog/
| |-- Manifest.json
| |-- README.md
| |-- demo/
| |-- qooxdoo/
| `-- source/
|-- stackoverflow/
| |-- Manifest.json
| |-- config.json
| |-- generate.py
| |-- readme.txt
| `-- source/
$ cd stackoverflow
$ vim config.json
config.json
.-----------
| ...
| "libraries" :
| {
| "library" :
| [
| {
| "manifest" : "../qx-contrib-Dialog/Manifest.json"
| }
| ]
| }
| ...
$ ./generate.py source
$ vim source/class/stackoverflow/Application.js
Application.js (adapted with reference to the demo on github [1])
.-----------
| ...
| // Add an event listener
| button1.addListener("execute", function(e) {
| // alert("Hello World!");
| dialog.Dialog.warning( "I warned you!" );
| });
| ...
|
$ ./generate.py source (cause the dialog classes aren't known yet)
Open app in your browser! :)
[1] https://github.com/cboulanger/qx-contrib-Dialog
Finally i got the solution for this error.
I just removed the following line from Dialog.js file, after that all are working fine.
'decorator' : "shadow-popup"
But shadow effect is missing.
So i did wrote a decorator named "shadow-popup" in theme file.
Thank you.