yarn install error:Failed to download Chromium - reactjs

The Yarn install failed to download Chromium. Error is as follows:
D:\workspace\www\ant-design-mobile-pro
λ yarn
yarn install v1.12.3
//...
Directory: D:\\workspace\\www\\ant-design-mobile-pro\\node_modules\\puppeteer
Output:
ERROR: Failed to download Chromium r599821! Set \"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD\" env variable to skip download.
{ Error: connect ETIMEDOUT 172.217.161.176:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.217.161.176',
success Saved lockfile.
Done in 343.80s.
Question:
Can I download Chromium manually? I can download it from https://npm.taobao.org/mirrors/chromium-browser-snapshots/Win_x64/,the question is: Where should I put it after dowloading it?

If you don't intend to run the automated browser tests which depend upon Chromium, you can skip the install per the error message:
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && yarn
I've occasionally encountered this yarn install timeout recently as well, and no cache clear or other manipulation has seemed to resolve it.

Related

Next JS : Error: EPERM: operation not permitted, open

I am trying to build the next Js app production files to deploy it on cPanel, when I execute
npm run dev the app is working just fine but as I start to build a production file with the help of this video(https://youtu.be/1ykSXau838c) and executes npm run build it gives me an error in the terminal as given below:
PS C:\Users\hp\Desktop\reactJs-project\NextJs\test-app> npm run build
> test-app#0.1.0 build
> next build
info - Checking validity of types
info - Creating an optimized production build .node:events:368
throw er; // Unhandled 'error' event
^
Error: EPERM: operation not permitted, open 'C:\Users\hp\Desktop\reactJs-project\NextJs\test-app\.next\trace'
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4048,
code: 'EPERM',
syscall: 'open',
path: 'C:\\Users\\hp\\Desktop\\reactJs-project\\NextJs\\test-app\\.next\\trace'
}
so I just want to know is there any way to solve this problem?
Posting comment from Koronag as an answer (as it helped me with this error and seems the most likely cause)...
This error is commonly seen when running a build while the dev server is already running. (E.g. in my case, I had a local build running via npm run dev and was trying to commit/push code, which invoked a Git Hook that also runs npm run dev.)
For me, it works fine this answer drives me to the resolver.
I run 2 scripts in terminals:
once for development
another for the build process.
So after killing the development script it looks perfectly fine!
From next-sitemap repo README.md
"Having next-sitemap command & next-sitemap.js file may result in file opening instead of building sitemaps in windows machines.
As a solution to this, it is now possible to use a custom config file instead of next-sitemap.js. Just pass --config .js to build command."
Next-Sitemap README.md - Building Sitemaps
The above worked for me

Module not found: Can't resolve './.htaccss' after installing React-boilerplate Dandelion starter project

I have downloaded Dandelion starter-project and decompressed it on a local folder. I ran:
npm i
npm run build:dll
and then
npm start
then it complains:
> dandelion_pro#1.6.1 start /home/......./dandelion/starter-project
> cross-env NODE_ENV=development node server
Happy[js]: Version: 5.0.1. Threads: 5 (shared pool)
Server started ! ✓
Access URLs:
-----------------------------------
Localhost: http://localhost:3001
LAN: http://xxx.xxx.xxx.xxx:3001
-----------------------------------
Press CTRL-C to stop
Webpack is building script...
Happy[js]: All set; signaling webpack to proceed.
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
webpack built 920e70412c607c0d50a6 in 3600ms
✖ 「wdm」:
ERROR in ./app/app.js
Module not found: Error: Can't resolve './.htaccess' in '/home/......./dandelion/starter-project/app'
# ./app/app.js 27:0-48
# multi ./node_modules/react-app-polyfill/ie11.js webpack-hot-middleware/client?reload=true ./app/app.js
I have searched the web looking for a solution, but I was unable to find one. My system is a Ubuntu 18.04.3 based machine running Linux Mint 19.3, nodejs 12.15.0 and npm 6.13.4. How can I solve this?
Well folks after an endless unsuccessful search on the web I created an empty ´.htaccess´ file and placed it into the ´app´ folder. Maybe this is not the better or the elegantest way to do it, but it worked for me.
I am posting this hoping it might be helpful.

Getting an error while the project running on android

I'm trying run my project on android. But I get an error like that.
C:\Users\Alperen\Desktop\AwesomeProject>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Command.handleAction (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:164:9)
I don't understand. What should I do ?

Grunt build failing

I'm trying to build my angularjs project but i keep getting this error. I have searched for a solution but could not find one. How can i fix this error?
Thanks.
Error message
"/usr/local/bin/grunt" "clean"
>> Local Npm module "grunt-aws" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read ".aws.json" file (Error code: ENOENT).
>> No "clean" targets found.
Warning: Task "clean" failed. Use --force to continue.
Aborted due to warnings.
Done.
I think you need to post-install your missing dependencies before your script launches on AWS.
Try adding in your package.json the following:
"scripts": { "postinstall": "npm install" }
Or simply run npm install grunt-aws grunt-contrib-connect ... before starting your app.

ECMDERR during bower install

I'm new to git, bower and electron etc.
I'm trying to install some dependencies through command line like this
bower install angular angular-route angular-material --save
It gives me error
I found this solution that says
You are probably behind a firewall. Try cloning via https – that has a higher chance of not being blocked
Then I tried this
bower install https://github.com/angular/bower-angular.git
but it still giving me error
Basically Error is
ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=No such file or directory
Additional error details: fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=No such file or directory
Can anyone have Idea what I'm doing wrong or what I'm missing here? I'm totally stuck over here. Any kind of help will be appreciated.
try this
git config --global url."https://".insteadOf git://
check this question for more details:
How to fix bower ECMDERR
I had some invalid proxy settings in .bowerrc
Removed them. All good :)
I managed to get it to work after i changed my .gitconfig file to sslVerify = false
Here is how my .gitconfig looks like:
[http]
sslVerify = false
[url "https://"]
insteadOf = git://
[url "https://github.com/"]
insteadOf = git://github.com/

Resources