How to install nvim-treesitter on Apple Silicon (M1 Max)? Getting error: Cannot install tree-sitter-cli for architecture arm64 - apple-m1

I'm trying to set up nvim on my MBP, and everything went well except for the last step, which is installing nvim-treesitter, after a short installing routine it throws this error:
nvim-treesitter[phpdoc]: Error during `npm install` (required for parser generation of phpdoc with npm dependencies)
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code 1
npm ERR! path /Users/anton/.local/share/nvim/tree-sitter-phpdoc/node_modules/tree-sitter-cli
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! /Users/anton/.local/share/nvim/tree-sitter-phpdoc/node_modules/tree-sitter-cli/install.js:24
npm ERR! throw new Error(`Cannot install tree-sitter-cli for architecture ${process.arch}`);
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot install tree-sitter-cli for architecture arm64
npm ERR! at Object.<anonymous> (/Users/anton/.local/share/nvim/tree-sitter-phpdoc/node_modules/tree-sitter-cli/install.
js:24:9)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR! at node:internal/main/run_main_module:17:47
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/anton/.npm/_logs/2022-07-07T19_21_36_165Z-debug-0.log
Did someone found a fix for that? Frankly, I'm not very deep into arch and compiller stuff, so I can assume I'm missing something on a surface.

It seems like phpdoc doesn't work on Apple Silicon.
You may ignore phpdoc parser to workaround if you're not using it:
ignore_install = { "phpdoc" },
Or use quick fix from github issue

Related

Compatibility error that occurs during Firebase Functions deployment

The following error has occurred.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: functions#undefined
npm ERR! Found: firebase-admin#undefined
npm ERR! node_modules/firebase-admin
npm ERR! firebase-admin#"^111.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase-admin#"^10.0.0 || ^11.0.0" from firebase-functions#4.2.1
npm ERR! node_modules/firebase-functions
npm ERR! firebase-functions#"^4.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-02-19T05_41_15_922Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-02-19T05_41_15_922Z-debug-0.log
After researching a solution, I was advised to use the following command, but the issue still remains unresolved.
npm install --force
npm install --legacy-peer-deps
Can anyone help me with a solution?
I just ran into this same issue installing dependencies for Firebase functions. What worked for me was going into the "package.json" file within the "functions" folder and changing
"firebase-admin": "^111.5.0"
to
"firebase-admin": "^11.0.0"
AFTER running firebase init functions, but before installing the dependencies with npm. Hope this helps!

I was running my nextJs server, all of a sudden an error is coming,

npm run dev
active-class-name#1.0.0 dev D:\Aman\aquadsoft\ept-react\new\ept-react
next
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module 'D:\Aman\aquadsoft\ept-react\new\ept-react\node_modules\next\dist\bin\next'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! active-class-name#1.0.0 dev: next
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the active-class-name#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AMAN\AppData\Roaming\npm-cache_logs\2020-07-11T05_00_56_071Z-debug.log
It worked finally, with removing the npm and npm-cache folder and then running command
npm install -g npm#latest
After that installed nextJs globally and run npm install inside my project directory.
It worked.

Troubling with installing firebase-tools

After installing node and the npm, I tried installing firebase-tools on my computer (because cloud functions). This is what I see:
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules/#google-cloud
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules/firebase-tools
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/firebase-tools'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/firebase-tools'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/firebase-tools\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/firebase-tools' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/joeljohnson/.npm/_logs/2018-01-26T16_56_29_829Z-debug.log
I haven't found a solution to my problem yet, how can I resolve this?
I was able to fix this. The problem is with the package 'grpc'. I don't know the exact nature of error but through trial and error i moved to the the directory where firebase was installed and installed grpc manually.
Commands for that are.
sudo npm install -g firebase-tools #This will give errors but let it be
cd /usr/lib/node_modules/firebase-tools/
sudo npm install grpc#1.4.1
sudo npm install -g firebase-tools

Cannot install atom package pandoc-convert in Manjaro

When I try to install the package pandoc-convert 1.1.0 on Atom 1.14.3 using the Manjaro LXqt OS 16.11 I get the following error:
Installing “pandoc-convert#1.1.0” failed.Hide output…
(node:9072) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
pandoc-bin#0.1.2 postinstall /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/pandoc-bin
node index.js
⧗ Downloading Pandoc (~20-50MB depending on OS). This may take a minute or so.
/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r
└── (empty)
npm WARN deprecated win-spawn#2.0.0: use cross-spawn or cross-spawn-async instead.
npm WARN deprecated find-file#0.1.4: Use the globby package instead
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received { url: 'https://raw.github.com/toshgoodson/pandoc-bin/0.1.0/vendor/linux/x64/pandoc',
name: 'pandoc',
os: 'linux',
arch: 'x64' }
at assertPath (path.js:7:11)
at Object.basename (path.js:1355:5)
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/download/index.js:35:43
at each (/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/each-async/each-async.js:63:4)
at module.exports (/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/download/index.js:33:5)
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/bin-wrapper/index.js:108:20
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/bin-wrapper/index.js:141:24
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/bin-check/index.js:30:20
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/executable/index.js:39:20
at FSReqWrap.oncomplete (fs.js:114:15)
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/package.json'
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No description
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No repository field.
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No README data
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No license field.
npm ERR! Linux 4.8.5-2-MANJARO
npm ERR! argv "/usr/bin/node" "/usr/lib/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/martinezce/.atom/.apm/.apmrc" "--userconfig" "/home/martinezce/.atom/.apmrc" "install" "/tmp/d-117127-9072-m6rmws.6kl2mg3nmi/package.tgz" "--runtime=electron" "--target=1.4.15" "--arch=x64" "--global-style"
npm ERR! node v7.6.0
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pandoc-bin#0.1.2 postinstall: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pandoc-bin#0.1.2 postinstall script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pandoc-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pandoc-bin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pandoc-bin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/martinezce/.atom/.apm/_logs/2017-02-27T13_55_01_959Z-debug.log
I can install it on a Windows machine fine, but on Manjaro it doesn't work.
Maybe, it's a package issue?
Thank you for your help.
Best Regards,
Cédric Martinez

Meteor doesn't install fibers in bundle

I created a bundle and try install as wrote in readme
> node ./build.js
module.js:340
throw err;
^
Error: Cannot find module '/root/bundle/programs/server/node_modules/fibers/build.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
npm ERR! fibers#1.0.1 install: `node ./build.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the fibers#1.0.1 install script.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./build.js
npm install -g fiders works as well
I'm not sure if this is the same problem, but starting with 0.9.0 you have to install fibers after unpacking the build. From the readme:
To prepare a bundle created with meteor bundle for execution on a server, you now run npm install with no arguments instead of having to specify a few specific npm modules and their versions explicitly. See the README in the generated bundle for more details.
I do something like this in my deployment script:
meteor bundle /path/to/target/bundle.tgz
cd /path/to/target/
rm -rf bundle
tar xzf bundle.tgz
cd bundle/programs/server && npm install

Resources