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

Solve Avoid CSS rgba #12163

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
be3c15a
Solve Avoid CSS rgba
innManish Mar 12, 2022
d8be085
Solve Add Vite Temp.
innManish Mar 12, 2022
1a3870e
Solve load js wasm file
innManish Mar 13, 2022
26b8a1f
Solve get yarn
innManish Mar 13, 2022
5e8e188
Solve CSS Being Supported in All Browsers
innManish Mar 13, 2022
e3d7e1b
Sove NPM Audit
innManish Mar 13, 2022
5bb49cc
Solve npx-create-react-app
innManish Mar 13, 2022
c1bf5a7
Solve Running NPM Start
innManish Mar 13, 2022
8030593
Solve ReactApp install
innManish Mar 13, 2022
f84462d
Solve React Project Start
innManish Mar 13, 2022
0d35326
Solve Yarn build fresh created react ts app
innManish Mar 13, 2022
aabb35a
Solve NPM Start
innManish Mar 13, 2022
de9e083
Solve Create React App
innManish Mar 14, 2022
6df173e
Solve Create React App Src
innManish Mar 14, 2022
5f4ad23
Solve Semantic UI CSS to create react app
innManish Mar 14, 2022
28dc21a
Solve Yarn Start
innManish Mar 14, 2022
a9d1c57
Solve HTML webpack plugin
innManish Mar 14, 2022
ea627de
Solve Create React App
innManish Mar 14, 2022
dcd8ef1
Solve React App Compile
innManish Mar 15, 2022
4f81986
Solve Improve Build Process
innManish Mar 15, 2022
93e1f88
Solve Create React App
innManish Mar 15, 2022
429109e
Solve Create React App NPM
innManish Mar 15, 2022
8bd1238
Solve React App Yarn
innManish Mar 15, 2022
091c29b
Solve React App Work
innManish Mar 16, 2022
77cbfe6
Solve React App YARN
innManish Mar 16, 2022
3461ce6
Solve Create React App
innManish Mar 16, 2022
732e393
Solved NPX Create React App
innManish Mar 16, 2022
40009d4
Solved NPM Start
innManish Mar 23, 2022
353925d
Solved Run React
innManish Mar 24, 2022
6b42b43
Solved React App Work
innManish Mar 24, 2022
af28385
Solved Face Run React
innManish Mar 24, 2022
b115565
Solved NPM Work
innManish Mar 24, 2022
e1b1eac
Solved NPm Start
innManish Mar 24, 2022
d1062e9
Solved Start React
innManish Mar 24, 2022
1c8eb2f
Solved NPM Run Eject
innManish Mar 25, 2022
4f1a900
Solved NPM React Install
innManish Mar 25, 2022
9ab6ebf
Solved NPm Run
innManish Mar 25, 2022
715755e
Solved NPX React App Run
innManish Mar 25, 2022
14fdc42
Solved Coverage Report
innManish Mar 26, 2022
18cb947
Solved Remove Javascript
innManish Mar 26, 2022
970e630
Solved React App Freez
innManish Mar 26, 2022
ce2bbdd
Solved Lerna With Yarn
innManish Mar 26, 2022
59836aa
Solved start app using app grpc web
innManish Mar 26, 2022
c831614
Solved Order of CSS
innManish Mar 26, 2022
2b3f895
Solved React Error
innManish Mar 26, 2022
ff7ac61
Solved React App Run
innManish Mar 26, 2022
fd73075
Solved React App Work
innManish Mar 26, 2022
f64aebe
Solved NPm start Work
innManish Mar 26, 2022
46a3155
Solved React App Work
innManish Mar 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NPX React App Run .txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To fix the issue, run these commands in sequence

npm init
npm install create-react-app
npx create-react-app myapp

7 changes: 7 additions & 0 deletions RunReactApp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
In my case, "create-react-app" was not installed. to install run this command

npm install -g create-react-app
Once installation successful, try running

npx create-react-app hello-world
If this works for you. Great else comment what worked for you,
3 changes: 3 additions & 0 deletions npx create-react-app.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// npm init

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why you've created this file ?

// npm install create-react-app
// npx create-react-app myapp
27 changes: 27 additions & 0 deletions solve load js wasm files.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// I finally found what is the right way to load a wasm application in a wasm-bindgen project!

// In fact, everything was on this page

// When you compile the project without wanting to run it with a bundler, you have to run wasm-pack build with a --target flag.

wasm-pack build --release --target web

// This creates a .js file (pkg/test_wasm.js in my example) with everything you need to load the wasm-application.

// And then this is how you use the functions created by wasm-bindgen (index.js):

import init from './pkg/test_wasm.js';
import {ex_function, ex_Struct ...} from '../pkg/test_wasm.js';

function run {
// use the function ex_function1 here

}

init().then(run)

// You include your index.js in your HTML file

<script type="module" src="./index.js"></script>

// and than it's work
15 changes: 15 additions & 0 deletions solve npm start.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// If you see this:

npm ERR! UpScore@0.6.0 start: `react-scripts start`
npm ERR! spawn ENOENT

// It just means something went wrong when dependencies were installed the first time.

// I suggest doing these three steps:


npm install -g npm@latest to update npm because it is sometimes buggy.
rm -rf node_modules to remove the existing modules.
npm install to re-install the project dependencies.

// This should fix the problem.
15 changes: 15 additions & 0 deletions solve yarn build fresh react ts app.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Here's how I solved this temporarily until react-scripts@4.01 is released.

// 1.Place a file in your package root called verifyTypeScriptSetup.js that contains the following

"use strict";
function verifyTypeScriptSetup() {}
module.exports = verifyTypeScriptSetup;

// 2. Add the following prestart to your scripts in package.json

"prestart": "cp verifyTypeScriptSetup.js node_modules/react-scripts/scripts/utils",

// Now when you run npm start the errant verifyTypeScriptSetup.js in node_modules is patched.

// Note: This bypasses all of CRA's checking for a valid tsconfig.json, so you better know what you're doing. Also, be sure to remove this line AFTER you migrate to react-scripts@4.01.
113 changes: 113 additions & 0 deletions solveCSS not being supported.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/* All browsers behave differently and have their own type of CSS. In the case of Chrome browsers, devs need to set the WebKit pixel ratio. The code below demonstrates how to do so with various Chrome versions. */
ManishINN marked this conversation as resolved.
Show resolved Hide resolved

/* Chrome version 29 and above */
@media screen and (-webkit-min-device-pixel-ratio:0)
and (min-resolution:.001dpcm) {
selector{ property:value; }
}

/* Test website on real Chrome version 29 and above */


/* Chrome version 22-28 */
@media screen and(-webkit-min-device-pixel-ratio:0) {
selector { -chrome-:only (;
property:value;
);}
}

/* Chrome, Safari, and also the Edge Browser and Firefox */
@media and (-webkit-min-device-pixel-ratio:0) {
selector { property:value; }
}

/* In the case of IE browsers, use conditional statements for CSS code. The example here uses the if conditional for all sections, like the header section, HTML elements, etc.*/

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="only-ie.css" />
<![endif]-->

/* Using conditional comments with head section CSS */
<!--[if IE]>
<style type="text/css">
/************ css for all IE browsers ****************/
</style>
<![endif]-->

/* Using conditional comments with HTML elements */
<!--[if IE]> <div class="ie-only"> /*content*/ </div> <![endif]-->

/* IE10+ */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
selector { property:value; }
}

/* IE6,7,9,10 */
@media screen and (min-width: 640px), screen\9 {
selector { property:value; }
}

/* IE6,7 */
@media screen\9 {
selector { property:value; }
}

/* IE8 */
@media \0screen {
selector { property:value; }
}

/* IE9,10 */
@media screen and (min-width:0\0){
selector { property:value; }
}

/* When it comes to the Microsoft Edge browser, the process is simple as it involves a simple selector that has a property value. It also provides automatic alignment which is considered the easy way to create browser-specific CSS code.*/

@supports (-ms-ime-align:auto) {
selector {
property: value;
}
}

/* In Firefox, first use the prefix for the URL. Or, use moz-appearance to show an element using platform-native styling based on the operating system’s theme.*/

@-moz-document url-prefix() {
selector {
property:value;
}
}

/* or */

@supports (-moz-appearance:none) {
selector { property:value; }
}

/* In the case of Safari web browsers, the media uses minimum resolution and WebKit appearance properties in the recent versions. In the previous Safari versions, it used pixel ratio for a CSS property*/

/* Safari 11+ */
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) and (stroke-color:transparent) {
selector {
property:value;
}
}}
/* Test website on real Safari 11+ */

/* Safari 10.1 */
@media not all and (min-resolution:.001dpcm){
@supports (-webkit-appearance:none) and (not (stroke-color:transparent)) {
selector {
property:value;
}
}}

/* Safari 6.1-10.0 (but not 10.1) */
@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0){
@media {
selector {
property:value;
}
}}

32 changes: 32 additions & 0 deletions solveHTML webpack plugin.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// The problem is indeed the file-loader, because it simply copies the file over. By the time html-webpack-plugin tries to write index.html it has already been written by file-loader, hence resulting in a conflict.

// There are several ways to resolve that issue, depending on what your needs are.

// You could use html-loader for your HTML, although if you expect your imported HTML to simply be copied, it isn't the correct choice. To be clear, by the imported HTML I don't mean the template used by the html-webpack-plugin.

// If you want to keep using the file-loader for your other HTML files, you can exclude the index.html so html-webpack-plugin falls back to its default loader. require.resolve works like require but gives you the full path of the module instead of its content.


{
test: /\.html$/,
exclude: [/node_modules/, require.resolve('./index.html')],
use: {
loader: 'file-loader',
query: {
name: '[name].[ext]'
},
},
},

// When no loader matches the template, the html-webpack-plugin uses an ejs loader as a fallback. If you don't need any loader for .html files, you could remove the rule entirely and it would work just fine. That is rather unlikely, otherwise you wouldn't have a .html rule in the first place, but this also means you can use the .ejs extension to not apply the .html rule, as all HTML is valid EJS. You would rename index.html to index.ejs and change your plugin configuration accordingly:

new HtmlWebpackPlugin({
template: 'index.ejs',
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
},
chunksSortMode: 'dependency'
})

24 changes: 24 additions & 0 deletions solveImprove build process.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// actually establishing a build process when there isn't much of one in place to begin with.

Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had far too many issues crop up in the two years I have been a part of this team (and company). It's past time to do something about that, and the upshot is that we'll be able to kill two Joel Test birds with one stone (daily builds and one-step builds, neither of which exists in any form whatsoever).

What I'm after here is some general insight on the kinds of things I need to be doing or thinking about, from people who have been in software development for longer than I have and also have bigger brains. I'm confident that will be most of the people currently posting in the beta.

Relevant Tools: Visual Build Source Safe 6.0 (I know, but I can't do anything about whether or not we use Source Safe at this time. That might be the next battle I fight.)

Tentatively, I've got a Visual Build project that does this:

1.Get source and place in local directory, including necessary DLLs needed for project.

2.Get config files and rename as needed (we're storing them in a special sub directory that isn't part of the actual application, and they are named according to use).

3.Build using Visual Studio

4.Precompile using command line, copying into what will be a "build" directory

5.Copy to destination.

6.Get any necessary additional resources - mostly things like documents, images, and reports that are associated with the project (and put into directory from step 5). There's a lot of this stuff, and I didn't want to include it previously. However, I'm going to only copy changed items, so maybe it's irrelevant. I wasn't sure whether I really wanted to include this stuff in earlier steps.
I still need to coax some logging out of Visual Build for all of this, but I'm not at a point where I need to do that yet.

Does anyone have any advice or suggestions to make? We're not currently using a Deployment Project, I'll note. It would remove some of the steps necessary in this build I presume (like web.config swapping).
17 changes: 17 additions & 0 deletions solveNPMStart.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Author of Create React App checking in.

You absolutely should not be installing react-scripts globally.
You also don't need ./node_modules/react-scripts/bin/ in package.json as this answer implies.

If you see this:

npm ERR! UpScore@0.6.0 start: `react-scripts start`
npm ERR! spawn ENOENT
It just means something went wrong when dependencies were installed the first time.

I suggest doing these three steps:

npm install -g npm@latest to update npm because it is sometimes buggy.
rm -rf node_modules to remove the existing modules.
npm install to re-install the project dependencies.
This should fix the problem.
5 changes: 5 additions & 0 deletions solveNPmRunEject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
create-react-app encapsulates all of the npm modules it is using internally, so that your package.json will be very clean and simple without you having to worry about it.

However, if you want to start doing more complex things and installing modules that may interact with modules create-react-app is using under the hood, those new modules need to know what is available and not, meaning you need to have create-react-app un-abstract them.

That, in essence, is what react-scripts eject does. It will stop hiding what it's got installed under the hood and instead eject those things into your project's package.json for everyone to see
5 changes: 5 additions & 0 deletions solveReactappinstall.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// To fix the issue, run these commands in sequence

npm init
npm install create-react-app
npx create-react-app myapp
11 changes: 11 additions & 0 deletions solveaddvitetemp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Create vite project
1. Create vite project from vue-ts template npm init vite@latest vite-vue-typescript-starter -- --template vue-ts
2. Move contents of created folder into root of repo.

$ mv vite-vue-typescript-starter/* vite-vue-typescript-starter/.gitignore .
$ rmdir vite-vue-typescript-starter

3. git add .
4. git commit -m 'npm init vite@latest . -- --template vue-ts'

// Links https://vitejs.dev/guide/#scaffolding-your-first-vite-project
14 changes: 14 additions & 0 deletions solveavoid CSS3 rgba.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Sass will preserve the format of your color... unless it is in something other than the keyword, hex, or rgba formats. If you want to absolute format, then you have to turn into string For example : - In scss variable file

// $mercury-grey: #{'rgba(230, 230, 230, 1)'};

Input

.class {
color: $mercury-grey;
}

Output:-
.class {
color: rgba(230, 230, 230, 1);
}
7 changes: 7 additions & 0 deletions solvecreactappwork.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Try by adding path variable, here are steps:

Use the global Search Charm to search "Environment Variables".
Click "Edit environment variables for your account"
Click "Environment Variables" in the dialog.
In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs (or path of node installaton). Make sure it is separated from any other paths by a ;
Click on apply and save the settings.
5 changes: 5 additions & 0 deletions solvecreatereact.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//Use This

npx create-react-app my-app
cd my-app
npm start
16 changes: 16 additions & 0 deletions solvecreatereactapp.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// From https://create-react-app.dev/docs/getting-started#creating-an-app

npx create-react-app my-app

// (npx comes with npm 5.2+ and higher)

// But you used

// `create-react-app my-app`
// If you use npm 5.1 or earlier, you can't use npx. Instead, install create-react-app globally:

npm install -g create-react-app

// Now you can run:

create-react-app my-app
5 changes: 5 additions & 0 deletions solvecreatereactappsrc.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Try with these steps :

npm rm -g create-react-app
npm install -g create-react-app
npx create-react-app my-app
22 changes: 22 additions & 0 deletions solved React App Run.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
0

Did you try recovering your dependencies? run npm install

and make sure from Node and npm version at least npm more than 6 and node more than 10

npm -v
node -v
and finally, try to delete the node_modules and package-lock and do npm i again



I had this issue before so I will share what my issue was:

in package.json just verify the integrity of you start command. Also try npm run start (add run to it)

"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
6 changes: 6 additions & 0 deletions solved React App Work.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
In my case, "create-react-app" was not installed. to install run this command

npm install -g create-react-app
Once installation successful, try running

npx create-react-app hello-world
6 changes: 6 additions & 0 deletions solved react app.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
In my case, "create-react-app" was not installed. to install run this command

npm install -g create-react-app
Once installation successful, try running

npx create-react-app hello-world
Loading