Ionic version: (check one with "x")
[x] 3.5.3
I'm submitting a ... (check one with "x")
[x] bug report
Current behavior:
I created a blank project using ionic start app blank. When I load the project using ionic lab or ionic serve I am getting an404 for main.css in the console
(index):32 GET http://localhost:8100/build/main.css
Steps to reproduce:
Start a new blank project and load the project.
Other information:
ionic info
global packages:
@ionic/cli-utils : 1.5.0
Ionic CLI : 3.5.0
local packages:
@ionic/app-scripts : 2.0.2
@ionic/cli-plugin-ionic-angular : 1.3.2
Ionic Framework : ionic-angular 3.5.3
System:
Node : v8.1.2
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 5.3.0
yeah , I just started seeing this issue now ,
here is more details on the error !
Your current PostCSS version is 5.2.17, but autoprefixer uses 6.0.8. Perhaps thi
s is the source of the error below.
[12:08:02] ionic-app-script task: "build"
[12:08:02] TypeError: Path must be a string. Received undefined
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.resolve (path.js:186:7)
at eachParent (C:\Users\Abanoub\Desktop\myApp\node_modules\browserslist\inde
x.js:65:18)
at getStat (C:\Users\Abanoub\Desktop\myApp\node_modules\browserslist\index.j
s:79:12)
at browserslist (C:\Users\Abanoub\Desktop\myApp\node_modules\browserslist\in
dex.js:188:15)
at Browsers.parse (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\
lib\browsers.js:61:16)
at new Browsers (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\li
b\browsers.js:52:30)
at loadPrefixes (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\li
b\autoprefixer.js:67:24)
at plugin (C:\Users\Abanoub\Desktop\myApp\node_modules\autoprefixer\lib\auto
prefixer.js:78:24)
at LazyResult.run (C:\Users\Abanoub\Desktop\myApp\node_modules\@ionic\app-sc
ripts\node_modules\postcss\lib\lazy-result.js:274:20)
You need to downgrade ionic/app-scripts to version 1.3.7 for now. (rm -rf node_modules first)
Some issue with autoprefixer npm update overnight
This is caused by the issue referenced here #12441
Could you please update the issue title to something related to the actual error ?
Something with "Your current PostCSS version is 5.2.17, but autoprefixer uses 6.0.8. Perhaps thi s is the source of the error below"
@ravindranrahul I am a newbie, I removed the node_modules dir, changed the version of app-scripts in package.jsonfrom 2.0.2 to 1.3.7, and did ionic serve but the installed version is still 2.0.2
So what should i do?
Never mind, I did npm install @ionic/[email protected] --save-dev and it worked
Please upgrade back to the latest version of app-scripts. There was a dependency that was broken that has been fixed. Delete your node modules folder and reinstall.
If it still does not work, you need to re-add your platform:
cordova platform rm ios
cordova platform add ios
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
Please upgrade back to the latest version of app-scripts. There was a dependency that was broken that has been fixed. Delete your node modules folder and reinstall.