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

gyp ERR! configure error during "npm ci" command run #2110

Closed
AlexanderNaiden opened this issue Apr 30, 2020 · 7 comments
Closed

gyp ERR! configure error during "npm ci" command run #2110

AlexanderNaiden opened this issue Apr 30, 2020 · 7 comments

Comments

@AlexanderNaiden
Copy link

PS E:\GitHub\discover.shared.books-admin-ui> npm ci
npm WARN prepare removing existing node_modules/ before installation

fsevents@1.2.12 install E:\GitHub\discover.shared.books-admin-ui\node_modules\fsevents
node-gyp rebuild

E:\GitHub\discover.shared.books-admin-ui\node_modules\fsevents>if not defined npm_config_node_gyp (node "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in
sys.exit(gyp.script_main())
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 547, in main
return gyp_main(args)
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2030, in GenerateOutput
sln_projects, project_objects, flat=msvs_version.FlatSolution())
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1787, in _GatherSolutionFolders
return _DictsToFolders('', root, flat)
File "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1740, in _DictsToFolders
for folder, contents in bucket.items():
AttributeError: 'MSVSProject' object has no attribute 'items'
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Aliaksandr_Naidzenka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\GitHub\discover.shared.books-admin-ui\node_modules\fsevents
gyp ERR! node -v v14.0.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

@AlexanderNaiden
Copy link
Author

AlexanderNaiden commented Apr 30, 2020

Win10 x64, node js - 14.0.0, npm - 6.14.4.
Does anybody have any idea how to fix issue with gyp?

@cclauss
Copy link
Contributor

cclauss commented Apr 30, 2020

#2058

@cclauss cclauss closed this as completed Apr 30, 2020
@AlexanderNaiden
Copy link
Author

AlexanderNaiden commented Apr 30, 2020

The issue occurs only during npm ci command but npm i works fine. However without npm ci command working correctly I can't do commit.
The error occurs with any of version python 3.7 or 2.7.
I've removed python 3.7 and then
I've done Option 1
Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

Now I have python 2.7 because it was installed with windows-build-tools.
And it does't work anyway.
I ran all commands in VS Code 1.44.2
From my side I don't see clearly answer in [https://github.com//issues/2058]

@jdom
Copy link

jdom commented Apr 30, 2020

I just started seeing this too, yesterday this wasn't happening? Was there a package update that triggered this?

@cclauss cclauss reopened this Apr 30, 2020
@AlexanderNaiden
Copy link
Author

AlexanderNaiden commented May 1, 2020

I didn't add any library so there are no changes in package.json or package-lock.json. I can provide package.json and package-lock.json if necessary. Also I've tried decrease nodejs version to version 12.16.3 LTS (npm version remains the same 6.14.4) but it didn't help.

@richardlau
Copy link
Member

richardlau commented May 1, 2020

There's two issues here:

  1. fsevents is macOS only. It specifies an os field in its package.json but this is apparently ignored by npm ci. fsevents used to provide prebuilt binaries up to fsevents@1.2.9 which meant for those versions it didn't attempt to compile. Those binaries are not provided for later versions of fsevents (e.g. 1.2.12 reported in this issue). See windows: fsevents v1 is getting built  fsevents/fsevents#301. This may be addressed "soonish" by a release containing Only build fsevents on macOS fsevents/fsevents#322.
  2. The AttributeError: 'MSVSProject' object has no attribute 'items' is probably a bug in gyp is likely something that needs to be fixed upstream (https://github.com/nodejs/gyp-next) and then synced back here.

@bzoz
Copy link
Contributor

bzoz commented May 6, 2020

This is exactly the same issue as #2058. node-gyp can't possibly control what is inside binding.gyp of the modules you are trying to build.

The fsevents package is now fixed, the solution here is to update the dependencies.

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

5 participants