Closed daniel-alonso-sanchez closed 2 years ago
Both node 4 and npm 3 are many years out of date, so if you can't upgrade, you're likely to remain broken - nobody's going to fix anything that old.
Wow, but... It's funny, because this got broken this week after years of being working...
Same problem here from another guy
Thank you so much for your response
And is there any way to debug the npm source code in order to get an idea about what is happening?
Thanks again!
Man I just got a similar error trying to upgrade a Meteor project. Meteor bundles node/npm so I can't directly update node. I'll see if I can find any more detail tomorrow.
npm ERR! ENOTDIR: not a directory, open '[project-name]/node_modules/.staging/@types/node-151e4347/package.json'
we are also experiencing the same problem ... suddenly
upon inspection, a node_modules/.staging
is being created, and populated, with the proper files. however, maybe it just "looks right" after the fact. the (ancient) Many ENOENT / ENOTEMPTY errors in output says
Sometimes this results in race conditions
so maybe a file is missing at the time it is read, and is written milliseconds later? it's just conjecture
none of our binaries have changed in ages. in all candor, we're in the same situation as OP
We have a big and old angularjs frontend app, that requires node4 and uses npm3.
except that we're using ✨ Node 6 ✨
none of the following permutations work
we are able to yarn install
with 'yarn@1.22.19' (under Node 6), enough so that our app launches. we're still in-flight, but we at least know that there's potential using yarn
Hi folks! I found the problem!
It is related with the library generator-jhipster (or any of its dependencies)
We don't use it anymore, so i got rid of it and everything works again!
Thanks everybody!
I've experienced the same issue, but here it was because of @azure/storage-file-datalake Updating the dependency fixed the issue
Hi @daniel-alonso-sanchez , Did you help how you identified that particular package is causing the issue? similar issue i'm also facing i have so many dependencies in package.json. its very difficult to find each and every package one by one.
Hi @rmtsys ! I pointed into the right direction thanks to jenkins. We kepts two executions: a successful and a failed one. Comparing both I found that the successful process this package, but not, the failed one:
I found that library was included by generator-jhipster. After got rid of generator-jhipster, the problem stop.
Regards
Encountered same error, this happens after I ran npm cache clean
, (before that it ran ok)
I do not have an option to upgrade the node version as this is some legacy project.
Is there anyway to solve it?
npm ERR! Darwin 20.5.0
npm ERR! argv "/Users/dina/.volta/tools/image/node/6.17.1/bin/node" "/Users/dina/.volta/tools/image/node/6.17.1/bin/npm" "install"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! path /Users/dina/Documents/my-app/node_modules/.staging/@types/estree-3b8366c1/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/Users/dina/Documents/my-app/node_modules/.staging/@types/estree-3b8366c1/package.json'
This is my package.json
{
"name": "my-app",
"version": "0.0.0",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"build-prod": "ember build --production",
"test": "ember test --silent -r xunit > tests/results/results.xml"
},
"repository": "",
"engines": {
"node": "6.9.4",
"npm": "3.10.8"
},
"author": "",
"license": "MIT",
"devDependencies": {
"@abcum/ember-helpers": "4.2.1",
"@stripe/stripe-js": "^1.5.0",
"acorn": "^6.1.0",
"babel-cli": "^6.26.0",
"babel-core": "6.26.3",
"babel-preset-env": "^1.6.1",
"babel-preset-latest": "^6.24.0",
"broccoli-asset-rev": "^2.2.0",
"ember-ajax": "0.7.1",
"ember-array-helper": "^1.0.1",
"ember-assign-polyfill": "2.6.0",
"ember-cli": "2.4.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^6.0.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-file-picker": "0.0.12",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-json-module": "0.0.3",
"ember-cli-qunit": "^1.1.0",
"ember-cli-release": "0.2.8",
"ember-cli-sass": "5.6.0",
"ember-cli-showdown": "3.2.2",
"ember-cli-uglify": "^1.2.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-fetch": "5.1.3",
"ember-intl": "2.27.0",
"ember-load-initializers": "^0.5.0",
"ember-paper": "0.2.15",
"ember-radio-button": "1.0.7",
"ember-resolver": "^2.0.3",
"ember-truth-helpers": "1.2.0",
"ember-wormhole": "0.3.5",
"file-saver": "^1.3.2",
"intl-format-cache": "2.1.0",
"loader.js": "^4.0.0"
},
"volta": {
"node": "6.17.1"
},
"dependencies": {}
}
figured out the issue by me
ember-fetch
was the cause of the problem.
The reason to the fail is dep of dep Merge pull request #125 from xg-wang/rollup_iife · ember-cli/ember-fetch@7199051
ember-fetch
uses rollup-plugin-babel
since version 5.1.2 which is not locked to a specific version that one of its updates fails npm 3 / node 6.
The solution was reverting to version ember-fetch
to 5.1.1 which isn’t suppose to cause any breaking change.
how to figure out what package is breaking by you:
I was having the same issue. As others have pointed out, it might be related to a library on package.json. In my case it was browser-sync.
how to figure out what package is breaking by you:
* Remove line by line in package.json and try to install * After understanding which package it is, downgrade the version until it is installed * Then check the package's package.json to check what changed
This was the approach that worked best for me! Thanks so much for the advice.
I was having the same issue. As others have pointed out, it might be related to a library on package.json. In my case it was browser-sync.
Exact same package causing the issue for me, thank you!
I imported the @types directly and I fixes that issue. I am not sure where it came from or what the lowest version of NPM is. that fixes this. Is this some automatic feature that some libraries updated to use it mid release? no idea.
Same problem here after cleaning the cache, damn, I guess related to @types, what exactly did you import directly? every package or just what it sounded good?
In case thanks, G.
Upgrade npm from 4.6 to 6.9 fixes this issue on serveral machines.
Instead of removing dependency and spending all that time (although it might optimize code by reducing unnecessary dependencies), just update the version of the node in the bitbucket-pipelines.yml file. In my case the image had: node:6.9.0, which I changed to node:12.16.0. This small change resolved my issue.
Hi! First of all, my apologies for reporting a problem of npm3 here, but it looks like the old repo is currently in read only mode.
We have a big and old angularjs frontend app, that requires node4 and uses npm3. A couple of days ago, a problem raised when someone performed a npm install.
error
package.json
npm-debug
I cannot upgrade to newer npm versions, because of the angularjs app and dependencies. I tried to move to npm6, but the application also packaging stopped working
Anyone have any clues about this? I'm completely desperated...
Thanks in advance and sorry again.