SPFx:Error in Manifest.js

Copper Contributor

Hello,

 

I had old spfx project which was recently developed using node v14.18.0. Now there is a need to upgrade the project to Node v18.18.2. So whatever dependencies needs to be upgraded I have upgraded all those in package.json file and installed node modules. Build and bundle both got succeeded but I have to debug this code for my new requirement. So I did gulp serve and tried to load script on chrome browser using "?debug=true&nodir=true&debugmanifestfile=<fileurl>".

This gave me error "Error loading manifest file. Type Error: Cannot convert undefined or null to object".

 

After that when I debug the manifest file I found that this error is where the paths:{} are empty e.g Below is the code in manifest where this error is:

"testStrings":{

     "defaultPath": "lib/webarts/test/loc/en-us.js",

      "type": "localizedPath",

      "Paths": {}

}

 

If let's say I remove this paths from here then it will work but manifest generates automatically after serve/bundle. So it recurring issue. Also, I have another solution where the same code is in manifest but that loads in browser without any issue.

Anyone knows the solution?

 

Thanks in advance.

 

0 Replies