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

ncu broken with Node 8.0.0-rc1 #355

Closed
juergenzimmermann opened this issue May 27, 2017 · 32 comments
Closed

ncu broken with Node 8.0.0-rc1 #355

juergenzimmermann opened this issue May 27, 2017 · 32 comments

Comments

@juergenzimmermann
Copy link

After replacing Node 7.10 with 8.0.0-rc.1 I get the following stacktrace when invoking ncu:

C:\workspace\software-engineering\angular-mean>ncu
C:\Zimmermann\npm-config\node_modules\npm-check-updates\node_modules\require-dir\index.js:97
            if (!require.extensions.hasOwnProperty(ext)) {
                                    ^

TypeError: require.extensions.hasOwnProperty is not a function
    at requireDir (C:\Zimmermann\npm-config\node_modules\npm-check-updates\node_modules\require-dir\index.js:97:37)
    at Object.<anonymous> (C:\Zimmermann\npm-config\node_modules\npm-check-updates\lib\versionmanager.js:8:23)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Zimmermann\npm-config\node_modules\npm-check-updates\lib\npm-check-updates.js:14:10)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
@raineorshine
Copy link
Owner

This appears to be an issue with the require-dir module. I have created an issue and will followup accordingly. Thanks!

@betimer
Copy link

betimer commented May 31, 2017

Also appears on my laptop. And now node 8 is not RC, it is officially released.
Expect to see the fix. Thank you.

@p3x-robot
Copy link
Contributor

same here

@pakastin
Copy link

yup, still broken in Node.js 8 stable as well..

@bonesoul
Copy link

exactly

@moeseth
Copy link

moeseth commented May 31, 2017

Same here as well!

@kerrance
Copy link

Getting this issue today after a Node update

@vecernik
Copy link

same on node8@osx

@skorunka
Copy link

same problem after installing node 8.0

@jharris4
Copy link

I copied the fix from the PR to require-dir https://github.com/aseemk/requireDir/pull/46/files into my global install of npm-check-updates, and it fixed the issue.

Guess we'll have to wait until the PR is merged and there's a newer version of require-dir.

@outaTiME
Copy link

same =(

@Sethios
Copy link

Sethios commented May 31, 2017

+1
@jharris4 that fixed it, tnx!

@JoshWalshaw
Copy link

Take a look at @jharris4 's pull file, simply replace the line and things will be working as intended until it's merged.

@jharris4
Copy link

Glad it helped! Although it wasn't my PR, I just found it. :-)

@outaTiME
Copy link

Thanks, im using the require-dir PR patch now

@raineorshine
Copy link
Owner

requre-dir 0.3.2 was published with the fix. Should be fixed now without any special patches, just run npm update -g npm-check-updates. (Or maybe you have to uninstall and re-install? Not sure since ncu's version is not changing, just the underlying require-dir dependency.)

@jharris4
Copy link

I might have recommended bumping the semver of require-dir in package.json to ^0.3.2 and tagging a new release, but heh.

@raineorshine
Copy link
Owner

@jharris4 ^0.3.1 includes 0.3.2 (semver).

@jharris4
Copy link

@raineorshine right, but my point was that ^0.3.2 is now required for ncu to work properly with Node 8, and ^0.3.1 is not sufficient (becomes important if you're using something like yarn lock files etc)

@mathiasbynens
Copy link

Or maybe you have to uninstall and re-install?

Confirmed: I needed to uninstall and then re-install.

npm uninstall npm-check-updates -g && npm install npm-check-updates -g

@raineorshine
Copy link
Owner

raineorshine commented May 31, 2017

@jharris4

right, but my point was that ^0.3.2 is now required for ncu to work properly with Node 8, and ^0.3.1 is not sufficient (becomes important if you're using something like yarn lock files etc)

Ah, you are right!

I think patches in general can be assumed to fix bugs within the same major/minor version. If you lock your dependencies and do not allow patch upgrades, you miss out on bug fixes.

@jharris4
Copy link

@mathiasbynens Just FYI, with npm 5.0.0 (which I just upgraded to) there are some problems uninstalling global packages. I had to re-install without uninstalling, but it worked.

Here's a link to the issue on npm: npm/npm#16738

@webjay
Copy link

webjay commented May 31, 2017

npm uninstall npm-check-updates -g && npm install npm-check-updates -g works.

@jharris4
Copy link

@webjay Are you using npm 5.0.0 with npm-check-updates previously installed with npm 4.x?

@webjay
Copy link

webjay commented May 31, 2017

@jharris4 I'm using npm 4.2.0 and node v8 on a Mac.

@jharris4
Copy link

@webjay I guessed as much. I'm using homebrew to install node on a Mac too :-)

@hezhongfeng
Copy link

@webjay Thank you! It works.

@p3x-robot
Copy link
Contributor

fixes here: #362

@xsynaptic
Copy link

I'm on OS X with Node installed by brew and npm installed separately. The uninstall also didn't work but npm install npm-check-updates -g alone seems to have fixed things up.

@heldrida
Copy link

heldrida commented Jun 22, 2017

El Capitan 10.11.6 / homebrew upgrade node v8.1.2 / npm v5.0.3

the attempt for npm uninstall npm-check-updates -g && npm install npm-check-updates -g or soleley npm install npm-check-updates -g as mentioned in a previous homebrew user comment, fails with:

`Unhandled rejection Error: Argument #2: Expected string but got nullf8dfac7a8f7b
at addDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:515:3)
at /usr/local/lib/node_modules/npm/lib/install/deps.js:463:5
at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
at Array.forEach (native)
at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
at Array.forEach (native)
at asyncMap (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
at loadDeps (/usr/local/lib/node_modules/npm/lib/install/deps.js:455:3)
at Array. (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
at /usr/local/lib/node_modules/npm/lib/install/and-finish-tracker.js:8:8
at resolveBranchDeps.then (/usr/local/lib/node_modules/npm/lib/install/deps.js:419:11)
at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Helder/.npm/_logs/2017-06-22T09_24_53_902Z-debug.log`

After removing the project node_modules and running npm install after the ncu uninstall and install process seems to fix the issue on this side.

jiahaog pushed a commit to nativefier/nativefier that referenced this issue Jun 29, 2017
@nirbhay94
Copy link

sudo apt-get remove nodejs

sudo apt-get remove npm

Then go to /etc/apt/sources.list.d and remove any node list if you have. Then do a

sudo apt-get update

Check for any .npm or .node folder in your home folder and delete those.

If you type

which node

you can see the location of the node. Try which nodejs and which npm too

Now install node.js

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

@Ankiewicz
Copy link

Ankiewicz commented Nov 6, 2017

I was able to resolve this quick because I have NVM installed. I just switched to a different version of Node.
*just make sure your project doesn't require that specific version of node.

I was using node -v = v8.7.0
switched to v6.2.2

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

No branches or pull requests