Problems with grunt serve - angularjs

I have project, but i can't run him. I use WebStorm IDE and after enter grunt serve I catch next errors:
grunt serve
Loading "connect.js" tasks...ERROR
>> SyntaxError: C:\Users\TT\Documents\ES\frontend\node_modules\grunt-contrib-connect\node_modules\connect\node_modules\type-is\node_modules\mime-types\node_modules\mime-db\db.json: Unexpect
ed end of input
Loading "cssmin.js" tasks...ERROR
>> Error: Cannot find module './source-map/source-map-generator'
Loading "jshint.js" tasks...ERROR
>> Error: Cannot find module 'jshint/src/cli'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
Loading "cdnify.js" tasks...ERROR
>> SyntaxError: C:\Users\TT\Documents\ES\frontend\node_modules\grunt-google-cdn\node_modules\google-cdn\node_modules\cdnjs-cdn-data\external\cdnjs.json: Unexpected end of input
Loading "inline_angular_templates.js" tasks...ERROR
>> Error: Cannot find module 'domutils'
Running "serve" task
Warning: Task "connect:livereload" not found. Use --force to continue.
Aborted due to warnings.
Execution Time (2015-05-10 09:03:36 UTC)
loading tasks 18ms █████████████████████████████████████████████████████████████████████████████████████████████████████████ 56%
serve 11ms ████████████████████████████████████████████████████████████████ 34%
Total 32ms
Can you help me? How to fix it and what need install in order to this project earned?

I found a solution.
Here are the steps:
Remove nodejs and all npm's.
Install node
npm install
npm install -g bower
bower install
grunt serve
Success

um... run:
$ grunt -v
this will give you the missing (corrupted) node_modules. Sometimes things get corrupted or such.
I ran into this same problem with grunt-google-cdn and reinstalled it. with $ npm install grunt-google-cdn --save and everything went fine after that :)
reinstalling everything is generally not required.

Related

processDebugResources FAILED after changing icon launcher

I change launcher icon in this address:
Projects\nameproject\android\app\src\main\res
And then linked them by this command:
npx react-native link
after re-building project by this command:
react-native run-android
I am getting following error:
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with
Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:comman
d_line_warnings
108 actionable tasks: 5 executed, 103 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\Users\TORANJ\Desktop\Projects\insta\android\app\build\intermediates\merged_
manifests\debug\AndroidManifest.xml:16: AAPT: error: resource mipmap/ic_launcher
_round (aka com.insta:mipmap/ic_launcher_round) not found.
error: failed processing manifest.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 25s
error Failed to install the app. Make sure you have the Android development envi
ronment set up: https://facebook.github.io/react-native/docs/getting-started.htm
l#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8
081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\Users\TORANJ\Desktop\Projects\insta\android\app\build\intermediates\merged_
manifests\debug\AndroidManifest.xml:16: AAPT: error: resource mipmap/ic_launcher
_round (aka com.insta:mipmap/ic_launcher_round) not found.
error: failed processing manifest.
I ran gradlew clean but issue is persisting:
Does anybody have any idea how can i fix this?
I faced this same issue. It is because react-native android app icons run in round shaped. It shows build/ processDebugResources failed because we didn't add circle shaped app icon in res folder.
First, after creating a fresh project, look in the android/app/src/main/res folder, you will find ic_launcher & ic_launcher_round, right?
So, I suggest you to go Launcher icon generator to make two shaped icons (circle and square), paste them in icon folders with same name(ic_launcher & ic_launcher_round) and build the project.
You will find that app icon is updated.
I just copy ic_launcher and past it to same folder as ic_launcher_round. for example in mipmap-hdpi folder i just have an ic_launcher file and I manually copy and paste this, then run cd android && ./gradlew clean and run npx react-native link in root folder again, then rebuild the project again with npx react-native run-android command.

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.

yarn install error:Failed to download Chromium

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.

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.

Yeoman - Grunt Angular Generator : Compass Serve Error

I've been looking through error reports all day and re-reading posts on here and error reports on GitHub and not finding an answer to my problem.
Error
Running "concurrent:server" (concurrent) task
Warning: >> Local Npm module "grunt-contrib-compass" not found. Is it installed?
Warning: Task "compass:server" not found. Use --force to continue.
Aborted due to warnings.
Execution Time (2015-02-18 20:46:22 UTC)
loading tasks 3ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 75%
Total 4ms Use --force to continue.
Aborted due to warnings.
Execution Time (2015-02-18 20:46:21 UTC)
wiredep:app 137ms ▇▇▇▇ 7%
concurrent:server 1.7s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 91%
Total 1.8s
What I have Tried
Since the install couldn't find it to install it the first time, I reinstalled using bower install --save
After that I can't get anything to work.
Here is a copy of my Grunt.js
https://gist.github.com/ddavisgraphics/8fc9bb3958317f1fd06b
bower.json
https://gist.github.com/ddavisgraphics/d0828b048e2ac4543758

Resources