create-react-app material-ui build - material-ui

I'm use create-react-app and material-ui#next
After I run yarn build I got error
Failed to minify the code from this file:
./node_modules/material-ui/es/Typography/Typography.js
Read more here: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
How I can fix this error

Run
npx babel node_modules\material-ui --out-dir node_modules\material-ui --presets=env,react
before
yarn build

Related

Not able to run builds on travis after using SPM plugin

Getting following error when running builds having any SPM plugin like SwiftGenPlugin:
The following build commands failed:
Validate plug-in “SwiftGenPlugin” in package “swiftgenplugin”
Build link: https://app.travis-ci.com/github/mukesh-mt/SwiftGenTest/jobs/592013507
Sample project: https://github.com/mukesh-mt/SwiftGenTest
I was able to solve this issue by using -skipPackagePluginValidation option in xcodebuild.
With fastlane you can pass it with --xcargs "-skipPackagePluginValidation" option in gym command
See this build https://app.travis-ci.com/github/mukesh-mt/SwiftGenTest/builds/259435024

Unable to build android apk file from ionic framework

I am new to IONIC. My problem is that I am trying to build an apk file using downloaded project. I getting an error. Attaching my logs for reference. Any help would be great
Using this command to build apk ionic cordova build android --prod --release
> ionic-v1.cmd build
[17:21:38] Invoking sass gulp task.
> cordova.cmd build android --release
Running command: node E:\Ionic Projets\zmNinja-master\hooks\before_prepare\02_jshint.js E:\Ionic Projets\zmNinja-master
cordova-custom-config: Skipping auto-restore of config file backup(s)
Running command: node E:\Ionic Projets\zmNinja-master\hooks\after_prepare\010_add_platform_class.js E:\Ionic Projets\zmNinja-master
Running command: node E:\Ionic Projets\zmNinja-master\hooks\after_prepare\020_remove_sass_from_platforms.js E:\Ionic Projets\zmNinja-master
Using "requireCordovaModule" to load non-cordova module "glob" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.```

How to solve Azure DevOps Ionic pipeline build error?

I'm trying to build Ionic framework using Hosted macOS agent in Azure DevOps pipeline. I have the below build steps.
install npm#latest -g (NPM)
install -g #ionic/app-scripts#latest --save-dev (NPM)
npm i -g ionic#latest --verbose (Ionic CLI )
build ios (Ionic CLI )
But I'm getting the below error.
2018-11-15T02:36:25.4788550Z ==============================================================================
2018-11-15T02:36:25.4788690Z Task : Ionic Command
2018-11-15T02:36:25.4788740Z Description : Run an Ionic CLI command
2018-11-15T02:36:25.4788770Z Version : 1.3.12
2018-11-15T02:36:25.4788800Z Author : Microsoft Corporation
2018-11-15T02:36:25.4788900Z Help : [More Information](http://go.microsoft.com/fwlink/?LinkID=692057)
2018-11-15T02:36:25.4788940Z ==============================================================================
2018-11-15T02:36:25.9506080Z Module cache at /Users/vsts/.taco_home/node_modules
2018-11-15T02:36:26.9844280Z cordova already installed.
2018-11-15T02:36:26.9845750Z Cordova Module Path: /Users/vsts/.taco_home/node_modules/cordova/8.1.2/node_modules/cordova
2018-11-15T02:36:26.9849330Z Module cache at /Users/vsts/.taco_home/node_modules
2018-11-15T02:36:27.9211450Z ionic already installed.
2018-11-15T02:36:27.9213230Z Ionic Module Path: /Users/vsts/.taco_home/node_modules/ionic/4.3.1/node_modules/ionic
2018-11-15T02:36:28.4726980Z [WARN] ionic build is for building web assets and takes no arguments. See ionic build --help.
2018-11-15T02:36:28.4727450Z
2018-11-15T02:36:28.4727570Z Ignoring argument ios. Perhaps you meant ionic cordova build ios?
2018-11-15T02:36:28.4727640Z
2018-11-15T02:36:28.5020530Z > ionic-app-scripts build
2018-11-15T02:36:30.8035540Z [02:36:30] ionic-app-scripts 3.2.0
2018-11-15T02:36:30.8054190Z [02:36:30] build dev started ...
2018-11-15T02:36:30.8621960Z [02:36:30] ionic-app-script task: "build"
2018-11-15T02:36:30.8622700Z [02:36:30] Error: ENOENT: no such file or directory, open
2018-11-15T02:36:30.8623700Z '/Users/vsts/agent/2.142.1/work/1/s/MyApp/node_modules/#angular/core/package.json'
2018-11-15T02:36:30.8630180Z Error: ENOENT: no such file or directory, open '/Users/vsts/agent/2.142.1/work/1/s/MyApp/node_modules/#angular/core/package.json'
2018-11-15T02:36:30.8632330Z at Error (native)
2018-11-15T02:36:30.8807840Z [ERROR] An error occurred while running subprocess ionic-app-scripts.
2018-11-15T02:36:30.8808230Z
2018-11-15T02:36:30.8809020Z ionic-app-scripts build exited with exit code 1.
2018-11-15T02:36:30.8809110Z
2018-11-15T02:36:30.8809730Z Re-running this command with the --verbose flag may provide more information.
2018-11-15T02:36:30.9233030Z ##[error]Task failed
2018-11-15T02:36:30.9263660Z ##[section]Finishing: Ionic Command build ios

how to fix ionic application error when we serve the application

When we run this command (ionic lab) then it show this error.
how we solve it..
ng run app:serve --host=0.0.0.0 --port=8100
[ng] The run command requires to be run in an Angular project, but a project definition could not be found.
[ERROR] ng has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details.
check the command line if you are in the directory containing package.json and run the following commands:
npm install
ionic serve
It seems you are not inside the right folder. You have to run your ng run command in the same place your runned your ng new command (or wherever you have initialized your Angular project).

How to make a prod build in "Ionic upload" command?

I want to use Ionic deploy service in Ionic cloud.
When I run ionic upload command, a dev build is immediately triggered instead of prod build.
Is it possible to create a --prod build and upload?
One of major reasons is that multiple configurations in my code are bundled with --prod build only.
ionic upload --deploy=dev
[INFO] Running app-scripts build:
[09:55:59] build dev started ...
[09:55:59] clean started ...
[09:55:59] clean finished in 1 ms
You could pipe the npm scripts to run the ionic --prod first and then ionic upload
"scripts":{
"custom-upload":"ionic cordova build --prod | ionic upload"
}
and then run in the terminal
$: npm custom-upload
This will still run the dev build i think but your prod build should be packaged as well. It does not look like you can specify a build type in the ionic upload command, which makes me think that the ionic upload does not upload the production build to ionic view. And if that is that case then you might want to consider changing the configurations setup in a prod build to be set to only be used if not on localhost instead on based on the build.