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 3 issue #73

Closed
ghost opened this issue Jul 16, 2015 · 9 comments
Closed

NPM 3 issue #73

ghost opened this issue Jul 16, 2015 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 16, 2015

    generator.GenerateOutput(flat_list, targets, data, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2000, in G
enerateOutput
    sln_projects, project_objects, flat=msvs_version.FlatSolution())
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1759, in _
GatherSolutionFolders
    return _DictsToFolders('', root, flat)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1712, in _
DictsToFolders
    for folder, contents in bucket.iteritems():
AttributeError: 'MSVSProject' object has no attribute 'iteritems'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configur
e.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuil
d"
gyp ERR! cwd C:\git\pos\node_modules\fsevents
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN EPACKAGEJSON OpSuite.MobilePOS@0.0.0 No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i
nstall" "--save-dev" "fsevents"
npm ERR! node v0.12.7
npm ERR! npm  v3.1.2
npm ERR! code ELIFECYCLE

npm ERR! fsevents@0.3.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents@0.3.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the fsevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls fsevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
@es128
Copy link
Contributor

es128 commented Jul 16, 2015

There's no need to build fsevents on windows.

@bnoordhuis
Copy link
Contributor

Besides, I don't think this is related to fsevents in the first place. The build error is this:

AttributeError: 'MSVSProject' object has no attribute 'iteritems'

And that comes from gyp / node-gyp. Make sure you have python 2 installed, not 3.

@es128 es128 closed this as completed Jul 16, 2015
@ghost
Copy link
Author

ghost commented Jul 16, 2015

everything that uses fsevents fails

C:\git\pos\node_modules\fsevents>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Traceback (most recent call last):
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 533, in script_main
    return main(sys.argv[1:])
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 526, in main
    return gyp_main(args)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 511, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2000, in GenerateOutput
    sln_projects, project_objects, flat=msvs_version.FlatSolution())
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1759, in _GatherSolutionFolders
    return _DictsToFolders('', root, flat)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1712, in _DictsToFolders
    for folder, contents in bucket.iteritems():
AttributeError: 'MSVSProject' object has no attribute 'iteritems'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\git\pos\node_modules\fsevents
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN install:fsevents Couldn't install optional dependency: fsevents@0.3.6 install: `node-gyp rebuild`
npm WARN install:fsevents Exit status 1

@ghost
Copy link
Author

ghost commented Jul 16, 2015

@es128 Ah didn't know what. I don't think it's npm related anyway because I remember it failing before I updated. Wish packages could skip it or not have it throw confusing errors on windows

@es128
Copy link
Contributor

es128 commented Jul 16, 2015

Wish packages could skip it or not have it throw confusing errors on windows

That should be the case. Chokidar lists fsevents as an optionalDependency, so npm should know to let it fail silently or at least relatively elegantly. And the package.json here in fsevents does indicate that the module is only targeted for darwin.

There's a chance in your case that you can't get that far because your build chain is broken for any native extensions via npm and it doesn't handle that case as well. Might be good to report the condition to the npm issue tracker.

@giggio
Copy link

giggio commented Jul 24, 2015

This is a bug on NPM, they are working on it: npm/npm#8921

@cchamberlain
Copy link

This bug is particularly annoying on Windows because it seems to be the first (most depended upon maybe?) native module that always bombs. It used to be socket.io and now they've removed the native dependency so its this. Its more frustrating than socket.io because Windows users obviously don't want this package.

I agree this is an npm bug but it would be cool if there was a way to shim this for Windows, although I'm not sure if its even possible to make gyp skip the native build. I use Mac and Windows, and avoid native modules due to the stress on Windows. I will say that most the Windows issues are Windows issues (at work, I can't install C++ redistributables without wiping my machine, and at home Visual Studio is failing to install due to a bitshift error in the registry).

The future of native modules is pretty brittle with gyp dying, ninja migration not a priority, and no simple native build tool on Windows. This likely was not the best place to post this, but this is the module that shows up the most.

@giggio
Copy link

giggio commented Jul 27, 2015

They just fixed it in npm 3.2.0.

@cchamberlain
Copy link

@giggio yep.. was posted during the writing of my post. 👍

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

4 participants