i need update npm

Hi,

I’m working with Axway Appcelerator in Macintosh and i need update npm
Then i use
npm install npm@latest -g

but always the same error:

Error: ENAMETOOLONG: name too long, mkdir ‘/Users/carlos/(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/usr/local’
TypeError: Cannot read property ‘get’ of undefined
at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:78:20
at cb (/usr/local/lib/node_modules/npm/lib/npm.js:228:22)
at /usr/local/lib/node_modules/npm/lib/npm.js:266:24
at /usr/local/lib/node_modules/npm/lib/config/core.js:83:7
at Array.forEach ()
at /usr/local/lib/node_modules/npm/lib/config/core.js:82:13
at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)
at afterExtras (/usr/local/lib/node_modules/npm/lib/config/core.js:173:20)
at /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53
/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205
if (npm.config.get(‘json’)) {
^

TypeError: Cannot read property ‘get’ of undefined
at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:494:27)

Node version: 10.15.1

npm version: 6.4.1

What i can do???

Thanks

I found a few references to people having same error on internet, and the cause was a huge filename created accidentally somewhere that npm reads files, or bad prefix, created by using the output of an npm command which returned more than expected output.

In your case npm is trying to create this directory, note where the speech marks are:

mkdir ‘/Users/carlos/(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/usr/local’

What do you see for:

npm prefix --global

And do you see a wild filename when you do:

ls -l /Users/carlos

Hi, thanks for your answer

i cannot execute

npm prefix --global

always the same error with npm command

En martes, 16 de abril de 2019 0:24:40 CEST, John Gee via npm forum npm1@discoursemail.com escribió:


shadowspawn
John Gee
Regular

    April 15

I found a few references to people having same error on internet, and the cause was a huge filename created accidentally somewhere that npm reads files, or bad prefix, created by using the output of an npm command which returned more than expected output.

In your case npm is trying to create this directory, note where the speech marks are:

mkdir ‘/Users/carlos/(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5186) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/usr/local’

What do you see for:

npm prefix --global

And do you see a wild filename when you do:

ls -l /Users/carlos

Do you have a bad entry for prefix in your .npmrc?

cat ~/.npmrc

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.