lens
lens copied to clipboard
"Missing write access" npm error, missing UI components after upgrade to v5
Describe the bug
Launching Lens v5 (5.4.3) for the first time after running v4 throws this npm error in a popup before loading the UI:
Could not load extensions: npm WARN checkPermissions Missing write access to /Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
npm WARN Lens No description
npm WARN Lens No repository field.
npm WARN Lens No license field.
npm ERR! code ENOENT
npm ERR! syscall access
npm ERR! path /Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, access '/Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/phil/.npm/_logs/2022-03-19T01_43_08_118Z-debug.log
I can dismiss the error and the UI loads, but it causes several issues:
- The "log in" view is not shown
- The "welcome to Lens" wizard is not shown
- In a cluster's context menu, the "Add Cluster to Team Space" option is not shown
- In the settings view for a cluster, the LENS SPACES and EXTENSIONS categories are missing (only SETTINGS is shown)
How to fix
$ ll /Users/phil/Library/Application\ Support/Lens/node_modules
total 0
drwxr-xr-x 10 phil staff 320B 19 Oct 23:36 ./
drwxr-xr-x 41 phil staff 1.3K 18 Mar 20:14 ../
lrwxr-xr-x 1 phil staff 94B 19 Oct 23:36 kube-object-event-status@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/kube-object-event-status
lrwxr-xr-x 1 phil staff 87B 19 Oct 23:36 lens-license@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/license-menu-item
lrwxr-xr-x 1 phil staff 93B 19 Oct 23:36 lens-metrics-cluster-feature@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/metrics-cluster-feature
lrwxr-xr-x 1 phil staff 79B 19 Oct 23:36 lens-node-menu@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/node-menu
lrwxr-xr-x 1 phil staff 78B 19 Oct 23:36 lens-pod-menu@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/pod-menu
lrwxr-xr-x 1 phil staff 76B 19 Oct 23:36 lens-survey@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/survey
lrwxr-xr-x 1 phil staff 79B 19 Oct 23:36 lens-telemetry@ -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/telemetry
lrwxr-xr-x 1 phil staff 96B 19 Oct 22:48 lenscloud-lens-extension@ -> ../../../../../../Applications/Lens 2.app/Contents/Resources/extensions/lenscloud-lens-extension
Looking at lenscloud-lens-extension
(last row), it's the only symlink that points to a "Lens 2.app" path. That directory does not exist.
rm /Users/phil/Library/Application\ Support/Lens/node_modules/lenscloud-lens-extension
After removing the symlink and opening Lens again, all previously mentioned missing UI components are now shown.
Environment (please complete the following information):
- Lens Version: 5.4.3-latest.20220317.1
- OS: OSX 11.6
- Installation method (e.g. snap or AppImage in Linux): DMG download
/Users/phil/.npm/_logs/2022-03-19T01_43_08_118Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Applications/Lens.app/Contents/Frameworks/Lens Helper.app/Contents/MacOS/Lens Helper',
1 verbose cli '/Applications/Lens.app/Contents/Resources/app.asar/node_modules/npm/bin/npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--no-audit',
1 verbose cli '--only=prod',
1 verbose cli '--prefer-offline',
1 verbose cli '--no-package-lock'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 542ae54a9119266d
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall Lens
7 info lifecycle @~preinstall: @
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 20ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
16 silly install loadAllDepsIntoIdealTree
17 silly pacote directory manifest for lenscloud-lens-extension@file:/Applications/Lens.app/Contents/Resources/extensions/lenscloud-lens-extension fetched in 13ms
18 silly resolveWithNewModule [email protected] checking installable status
19 silly removeObsoleteDep removing lenscloud-lens-extension from the tree as its been replaced by a newer version or is no longer required
20 silly pacote file manifest for lens-node-menu@file:/Applications/Lens.app/Contents/Resources/extensions/node-menu/lens-node-menu-5.4.3-latest.20220317.1.tgz fetched in 64ms
21 silly resolveWithNewModule [email protected] checking installable status
22 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
23 silly pacote file manifest for lens-pod-menu@file:/Applications/Lens.app/Contents/Resources/extensions/pod-menu/lens-pod-menu-5.4.3-latest.20220317.1.tgz fetched in 64ms
24 silly resolveWithNewModule [email protected] checking installable status
25 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
26 silly pacote file manifest for lens-telemetry@file:/Applications/Lens.app/Contents/Resources/extensions/telemetry/lens-telemetry-5.4.3-latest.20220317.1.tgz fetched in 64ms
27 silly resolveWithNewModule [email protected] checking installable status
28 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
29 silly pacote file manifest for kube-object-event-status@file:/Applications/Lens.app/Contents/Resources/extensions/kube-object-event-status/kube-object-event-status-5.4.3-latest.20220317.1.tgz fetched in 72ms
30 silly resolveWithNewModule [email protected] checking installable status
31 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
32 silly pacote file manifest for lens-metrics-cluster-feature@file:/Applications/Lens.app/Contents/Resources/extensions/metrics-cluster-feature/lens-metrics-cluster-feature-5.4.3-latest.20220317.1.tgz fetched in 66ms
33 silly resolveWithNewModule [email protected] checking installable status
34 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
35 silly pacote file manifest for lens-survey@file:/Applications/Lens.app/Contents/Resources/extensions/survey/lens-survey-5.4.3-latest.20220317.1.tgz fetched in 65ms
36 silly resolveWithNewModule [email protected] checking installable status
37 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
38 silly pacote file manifest for lens-license@file:/Applications/Lens.app/Contents/Resources/extensions/license-menu-item/lens-license-5.4.3-latest.20220317.1.tgz fetched in 67ms
39 silly resolveWithNewModule [email protected] checking installable status
40 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
41 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 80ms
42 timing stage:loadIdealTree Completed in 82ms
43 silly currentTree Lens
43 silly currentTree +-- [email protected]
43 silly currentTree +-- [email protected]
43 silly currentTree +-- [email protected]
43 silly currentTree +-- [email protected]
43 silly currentTree +-- [email protected]
43 silly currentTree +-- [email protected]
43 silly currentTree +-- [email protected]
43 silly currentTree `-- lenscloud-lens-extension
44 silly idealTree Lens
44 silly idealTree +-- [email protected]
44 silly idealTree +-- [email protected]
44 silly idealTree +-- [email protected]
44 silly idealTree +-- [email protected]
44 silly idealTree +-- [email protected]
44 silly idealTree +-- [email protected]
44 silly idealTree +-- [email protected]
44 silly idealTree `-- [email protected]
45 silly install generateActionsToTake
46 silly diff-trees filtering actions: includeDev false includeProd true includeOpt true
47 warn checkPermissions Missing write access to /Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
48 timing stage:rollbackFailedOptional Completed in 0ms
49 timing stage:runTopLevelLifecycles Completed in 120ms
50 silly saveTree Lens
50 silly saveTree +-- [email protected]
50 silly saveTree +-- [email protected]
50 silly saveTree +-- [email protected]
50 silly saveTree +-- [email protected]
50 silly saveTree +-- [email protected]
50 silly saveTree +-- [email protected]
50 silly saveTree +-- [email protected]
50 silly saveTree `-- [email protected]
51 warn Lens No description
52 warn Lens No repository field.
53 warn Lens No license field.
54 verbose stack Error: ENOENT: no such file or directory, access '/Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
55 verbose cwd /Users/phil/Library/Application Support/Lens
56 verbose Darwin 20.6.0
57 verbose argv "/Applications/Lens.app/Contents/Frameworks/Lens Helper.app/Contents/MacOS/Lens Helper" "/Applications/Lens.app/Contents/Resources/app.asar/node_modules/npm/bin/npm-cli.js" "install" "--no-audit" "--only=prod" "--prefer-offline" "--no-package-lock"
58 verbose node v14.17.0
59 verbose npm v6.14.15
60 error code ENOENT
61 error syscall access
62 error path /Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
63 error errno -2
64 error enoent ENOENT: no such file or directory, access '/Users/phil/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
65 error enoent This is related to npm not being able to find a file.
66 verbose exit [ -2, true ]
How to reproduce
It looks like this is caused by renaming Lens.app
to anything else. Since I was trying different versions, I added the version to the name.
To reproduce:
- Rename
Lens.app
toLens 5.app
- Open the app
- The above mentioned npm error is thrown and the UI components are missing
After renaming it back to Lens.app
, Lens starts without issues.
FWIW, this is the first application I've seen that is unable to handle renaming it.
Hi, i have the same problem:
Could not load extensions: npm WARN checkPermissions Missing write access to /Users/MY_USER/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
npm WARN Lens No description
npm WARN Lens No repository field.
npm WARN Lens No license field.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /Users/MY_USER/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/Users/MY_USER/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
npm ERR! [Error: EACCES: permission denied, access '/Users/MY_USER/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/MY_USER/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/MY_USER/.npm/_logs/2022-03-21T08_46_09_011Z-debug.log
Version details:
Lens: 5.4.3-latest.20220317.1
Electron: 14.2.4
Chrome: 93.0.4577.82
Node: 14.17.0
I have the same issue.
I did not rename the app, and I was able to verify that the symlink works:
# pwd
/Users/myuser/Library/Application Support/Lens/node_modules
# ls -lsah
total 0
0 drwx------ 10 myuser wheel 320B Feb 22 15:22 .
0 drwx------ 54 myuser wheel 1.7K Mar 23 09:20 ..
0 drwx------ 4 myuser wheel 128B Feb 22 15:22 kube-object-event-status
0 drwx------ 4 myuser wheel 128B Feb 22 15:22 lens-license
0 drwx------ 5 myuser wheel 160B Feb 22 15:22 lens-metrics-cluster-feature
0 drwx------ 4 myuser wheel 128B Feb 22 15:22 lens-node-menu
0 drwx------ 4 myuser wheel 128B Feb 22 15:22 lens-pod-menu
0 drwx------ 4 myuser wheel 128B Feb 22 15:22 lens-survey
0 drwx------ 4 myuser wheel 128B Feb 22 15:22 lens-telemetry
0 lrwxr-xr-x 1 myuser wheel 94B Feb 22 15:22 lenscloud-lens-extension -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/lenscloud-lens-extension
# ls -lsah lenscloud-lens-extension
0 lrwxr-xr-x 1 myuser wheel 94B Feb 22 15:22 lenscloud-lens-extension -> ../../../../../../Applications/Lens.app/Contents/Resources/extensions/lenscloud-lens-extension
# ls -lsah lenscloud-lens-extension/
total 16
0 drwxr-xr-x 4 root wheel 128B Mar 17 14:12 .
0 drwxr-xr-x 10 root wheel 320B Mar 17 14:12 ..
0 drwxr-xr-x 6 root wheel 192B Mar 17 14:12 dist
16 -rw-r--r-- 1 root wheel 5.0K Mar 17 13:53 package.json
I found a Stackoverflow post saying we need to "sudo chown -R" on the symlink directory, but that did not help, either.
In my case, my company issued laptop is full of security measures that I likely won't be able to disable, but I can add temporary admin access (e.g. for the sudo command and to install Lens).
Please let me know if there is any further information that I can add that might help.
encounter the same issue. Solved by deleting all the content of /Users/yourusername/Library/Application Support/Lens and reinstall.