Unity 5.4b: npm unable to find missing packages on unity startup

Hi,
I tried to upgrade unity editor from version 5.1 (unity-editor-5.1.0f3+2015082501_amd64.deb) to 5.4b (5.4.0b10+20160317_amd64.deb) using official installer. The installation was successful. However unity is getting stuck at launch screen. I’ve checked Editor.log and the below snippet seems to be of interest
8<---------------------------------------------------------------------------------------------------------------------------------->8
ListPackages failed, output: {
“name”: “unity-editor”,
“version”: “5.3.0”,
“problems”: [
“missing: unity-editor-home@0.1.17, required by unity-editor@5.3.0”,
“missing: unityeditor-cloud-hub@^0.0.11, required by unity-editor@5.3.0”,
“missing: unityeditor-collab-history@^0.0.22, required by unity-editor@5.3.0”,
“missing: unityeditor-collab-toolbar@^0.0.28, required by unity-editor@5.3.0”
],
“dependencies”: {
“unity-editor-home”: {
“required”: “0.1.17”,
“missing”: true
},
“unityeditor-cloud-hub”: {
“required”: “^0.0.11”,
“missing”: true
},
“unityeditor-collab-history”: {
“required”: “^0.0.22”,
“missing”: true
},
“unityeditor-collab-toolbar”: {
“required”: “^0.0.28”,
“missing”: true
}
}
}

npm WARN package.json unity-editor@5.3.0 No repository field.
npm WARN package.json unity-editor@5.3.0 No README data
npm http GET https://registry.npmjs.org/unity-editor-home.0.1.17.tgz
npm http GET https://registry.npmjs.org/unityeditor-collab-toolbar.0.0.28.tgz
npm http GET https://registry.npmjs.org/unityeditor-collab-history.0.0.22.tgz
npm http GET https://registry.npmjs.org/unityeditor-cloud-hub.0.0.11.tgz
npm http 500 https://registry.npmjs.org/unityeditor-collab-history.0.0.22.tgz
npm ERR! TypeError: Cannot read property ‘latest’ of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
8<---------------------------------------------------------------------------------------------------------------------------------->8
I’ve tried to manually install one of the missing package which also failed as below
8<---------------------------------------------------------------------------------------------------------------------------------->8
$ npm install unity-editor-home.0.1.17.tgz
npm http GET https://registry.npmjs.org/unity-editor-home.0.1.17.tgz
npm http 500 https://registry.npmjs.org/unity-editor-home.0.1.17.tgz
npm ERR! TypeError: Cannot read property ‘latest’ of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “unity-editor-home.0.1.17.tgz”
npm ERR! cwd /home/ykhan/Downloads
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ykhan/Downloads/npm-debug.log
npm ERR! not ok code 0
8<---------------------------------------------------------------------------------------------------------------------------------->8
Am I missing something or is there a package related issue on the npm registry? Anyways, I’ve started download of unity-editor-5.3.4f1+20160316_amd64.deb atm.

Did the new version work better? I can confirm that there were some strange npm bugs in the last versions.

You can try extracting unity-editor-home.0.0.11.tgz from /Editor/Data/Resources/Packages to ~/.local/share/unity3d/Packages/node_modules or something like ~/.npm/node_modules, this fixed the launcher for me in one of the older versions.

For now I’ve switched back to 5.3.4 version and was facing the same startup issue with it as well. Thanks to your reply, it pointed me towards right direction. I copied over unityeditor-cloud-hub-0.0.1.tgz and unity-editor-home.0.0.11.tgz from /opt/Unity/Editor/Data/Resources/Packages/ directory. Created corresponding directories unityeditor-cloud-hub and unity-editor-home in ~/.local/share/unity3d/Packages/node_modules. Then I extracted tar files into corresponding package directories. Extraction created a package sub-directory containing dist directory and package.json file. I moved dist and package.json files one level up to the parent directory of package sub-directory. So for example, I’ve ~/.local/share/unity3d/Packages/node_modules/unity-editor-home directory containing dist and package.json. This solved the startup issue for me. Hopefully I will try to replicate the same for 5.4b version.

2 Likes

Hello! any follow up on this from Unity???

I haven’t been able to install it properly since 5.3.x … Sure, we can work around it… but the loading time due to the timeout of the script on the splash is ridiculous …

Every time I open Unity, it tries to run: node.exe “instal” “packageXyz” “–cache:./.npm” bla …

That 404 or 500s horribly causing the editor to stall for about 20+ seconds… obscene.

Have you installed npm and nodejs? In 5.3.4 Unity should start just fine when both is installed, at least it did for me.

Thank you both - your feedback / tips here enabled me to get the latest build (5.4.0f1) working. I had to copy / extract the missing NPM packages the same and then it worked just fine.

Thank you @mykhani ! That solved it for me on Ubuntu 14.04 with 5.4.0f3.

I tried extracting unity-editor-home.0.0.11.tgz from /Editor/Data/Resources/Packages to ~/.local/share/unity3d/Packages/node_modules or something like ~/.npm/node_modules.

Loading, Installing went nice.
But I cannot create new project.It is warning Error in launching, licence is invalid.

Did Unity become a paid version?shall we pay money to get licence?Please educate me on this aspect - upto now I am thinking that it is a freely available software.

Unity has a free (as in price) license. But it is not free (as in freedom) software.

Use the Unity Hub to manage your Unity installations and licenses.