Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install error on Win10 #14

Open
zhaoyue-zephyrus opened this issue Jan 29, 2021 · 0 comments
Open

npm install error on Win10 #14

zhaoyue-zephyrus opened this issue Jan 29, 2021 · 0 comments

Comments

@zhaoyue-zephyrus
Copy link

zhaoyue-zephyrus commented Jan 29, 2021

Hi,

I am trying to install tree-sitter-agda on Windows 10 (for language-agda). I tried to git clone locally and then npm install. The error log is as follows:

C:\Users\thuzh\tree-sitter-agda\src\parser.c(295,17): error C2001: newline in constant [C:\Users\thuzh\tree-sitter-agda\build\tree_
sitter_agda_binding.vcxproj]
C:\Users\thuzh\tree-sitter-agda\src\parser.c(296,18): error C2001: newline in constant [C:\Users\thuzh\tree-sitter-agda\build\tree_
sitter_agda_binding.vcxproj]
...
C:\Users\thuzh\tree-sitter-agda\src\parser.c(325,18): error C2001: newline in constant [C:\Users\thuzh\tree-sitter-agda\build\tree_
sitter_agda_binding.vcxproj]
C:\Users\thuzh\tree-sitter-agda\src\parser.c(326,18): error C2001: newline in constant [C:\Users\thuzh\tree-sitter-agda\build\tree_
sitter_agda_binding.vcxproj]
...
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.21296
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\thuzh\tree-sitter-agda
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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\thuzh\AppData\Roaming\npm-cache\_logs\2021-01-29T05_03_56_895Z-debug.log

I looked at the source code and the four lines are pointing to

...
(L295)  [anon_sym_] = "⦃",
(L296)  [anon_sym_2] = "⦄",
...
(L325)  [anon_sym_3] = "⦇",
(L326)  [anon_sym_4] = "⦈",
...

If I delete these four lines, then tree-sitter-agda can be installed successfully and so is language-agda. I guess these four non-ASCII characters are the main cause. Do you have some more elegant way to fix this?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant