I don't know if it's just too early in the morning but I can't figure out this error
18075 error Error: ENOENT, lstat 'C:\Users\Philippe\node_modules\phonegap\node_modules\cordova\node_modules\plugman\node_modules\npm\html\doc\api\npm-prune.html'
18076 error If you need help, you may report this log at:
18076 error <http://github.com/isaacs/npm/issues>
18076 error or email it to:
18076 error <npm-#googlegroups.com>
18077 error System Windows_NT 6.2.9200
18078 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "phonegap"
18079 error cwd C:\Users\Philippe
18080 error node -v v0.10.18
18081 error npm -v 1.3.8
18082 error path C:\Users\Philippe\node_modules\phonegap\node_modules\cordova\node_modules\plugman\node_modules\npm\html\doc\api\npm-prune.html
18083 error fstream_path C:\Users\Philippe\node_modules\phonegap\node_modules\cordova\node_modules\plugman\node_modules\npm\html\doc\api\npm-prune.html
18084 error fstream_type File
18085 error fstream_class FileWriter
18086 error code ENOENT
18087 error errno 34
18088 error fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
18088 error fstream_stack Object.oncomplete (fs.js:107:15)
18089 verbose exit [ 34, true ]
I would be very appreciative if someone could give me the short and sweet version.
Thanks
I ran the following commands
npm list -g
it showed me that I have an unmet dependency phonegap... so I ran
npm rm phonegap
npm cache clear
then tried installing it again
npm install -g phonegap
and it worked, the ENOENT error should have been a dead give away that npm was trying to tell me that the supposed files didn't exist or were corrupted.
#Torvos answer: please note sometimes you must run
npm rm -g phonegap
(at least for me this was the case; without -g option it didn't work)
Related
When I try to create a new project (vue create my-project), I get this error:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\npm-cache\_logs\2023-01-14T16_48_04_209Z-debug-0.log
**ERROR** Error: command failed: npm install --loglevel error --legacy-peer-deps
Error: command failed: npm install --loglevel error --legacy-peer-deps
at ChildProcess.<anonymous> (C:\Users\hp\AppData\Roaming\npm\node_modules\#vue\cli\lib\util\executeCommand.js:138:16)
at ChildProcess.emit (node:events:513:28)
at cp.emit (C:\Users\hp\AppData\Roaming\npm\node_modules\#vue\cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
I'm on PC / Windows 10, and updated vue/cli, node, and npm.
Persets: ([Vue 3] dart-sass, babel, router, vuex, unit-jest).
I updated vue/cli, node, npm, and yarn.
I search for a solution here, and tried these solutions:
npm cache clean --force
npm config set registry="http://registry.npmjs.org/"
vue config --set useTaobaoRegistry false
npm config set fetch-retry-mintimeout 20000 (This did't work).
npm config set fetch-retry-maxtimeout 120000 (This did't work).
But the error is still when creating a project.
After the Internet acceleration procedures, the packages were downloaded, but this error remained:
npm ERR! Invalid Version:
npm ERR! A complete log of this run can be found in:
npm ERR! C:\npm-cache_logs\2023-01-16T19_19_07_037Z-debug-0.log
ERROR Error: command failed: npm install --loglevel error --legacy-peer-deps
Error: command failed: npm install --loglevel error --legacy-peer-deps
at ChildProcess. (C:\Users\hp\AppData\Roaming\npm\node_modules#vue\cli\lib\util\executeCommand.js:138:16)
at ChildProcess.emit (node:events:513:28)
at cp.emit (C:\Users\hp\AppData\Roaming\npm\node_modules#vue\cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
i try to start a new ionic project and get the following Error
gyp ERR! node -v v14.20.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN AppName#0.0.1 No repository field.
npm WARN AppName#0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I already downgraded to Node 14 as mentioned by some others.
Is there anything else i could try?
Thanks!
SOLVED:
Node Version downgrade to 12 using nvm
I have the same problem you and also i downgrade node 12
and i will face with this error:
Downloading and installing node v12.22.12...
Downloading https://nodejs.org/dist/v12.22.12/node-v12.22.12-darwin-arm64.tar.xz...
curl: (22) The requested URL returned error: 404
Binary download from https://nodejs.org/dist/v12.22.12/node-v12.22.12-darwin-arm64.tar.xz failed, trying source.
grep: /Users/clooner/.nvm/.cache/bin/node-v12.22.12-darwin-arm64/node-v12.22.12-darwin-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: ${NVM_DIR}/.cache/src/node-v12.22.12/node-v12.22.12.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v12.22.12/node-v12.22.12.tar.xz
$>./configure --prefix=/Users/clooner/.nvm/versions/node/v12.22.12 <
./configure: line 3: exec: python: not found
nvm: install v12.22.12 failed!
I am getting NPM error when I am trying to build the solution as follows
144812 error Windows_NT 10.0.17763
144813 error argv "C:\\hostedtoolcache\\windows\\node\\6.17.1\\x64\\node.exe" "C:\\hostedtoolcache\\windows\\node\\6.17.1\\x64\\node_modules\\npm\\bin\\npm-cli.js" "install"
144814 error node v6.17.1
144815 error npm v3.10.10
144816 error path D:\a\45\s\Presentation Tier\VendorPortal.Web.UI\node_modules\.staging\#types\node-b1eb4de5\package.json
144817 error code ENOTDIR
144818 error errno -4058
144819 error syscall open
144820 error ENOENT: no such file or directory, open 'D:\a\45\s\Presentation Tier\VendorPortal.Web.UI\node_modules\.staging\#types\node-b1eb4de5\package.json'
144821 error If you need help, you may report this error at:
144821 error <https://github.com/npm/npm/issues>
144822 verbose exit [ -4058, true ]
##[error]Error: Npm failed with return code: 4294963238
I tried delete package-lock.json, npm cache clean command, npm install npm#latest -g everything. But I am still getting the error. Error occurs in NPM install step.
I'm having some trouble configuring Gitlab CI to run firebase emulators. In particular, it's failing to install firebase-tools. This is the relevant part of my config
unit-test-job: # This job runs in the test stage.
image: node:14.14.0
artifacts:
paths:
- "test-results.xml"
reports:
junit: "test-results.xml"
stage: test
script:
- apt-get update && apt-get install -y openjdk-8-jdk
- npm i
- npm i -g firebase-tools
- firebase use $MY_PROJECT
- echo "Running unit tests..."
- npm run test:ci
When trying to install firebase-tools I get this error from the CI
$ npm i -g firebase-tools
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
> re2#1.16.0 install /usr/local/lib/node_modules/firebase-tools/node_modules/re2
> install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild
Trying https://github.com/uhop/node-re2/releases/download/1.16.0/linux-x64-83.br ...
Writing to build/Release/re2.node ...
Trying https://github.com/uhop/node-re2/releases/download/1.16.0/linux-x64-83.gz ...
Writing to build/Release/re2.node ...
Building locally ...
npm ERR! code EACCES
npm ERR! syscall scandir
npm ERR! path /root/.npm/_logs
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 65534:0 "/root/.npm"
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
> re2#1.16.0 rebuild /usr/local/lib/node_modules/firebase-tools/node_modules/re2
> node-gyp rebuild
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.14.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/firebase-tools/node_modules/re2/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase-tools/node_modules/re2/.node-gyp'
gyp ERR! System Linux 5.4.109+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/firebase-tools/node_modules/re2
gyp ERR! node -v v14.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! re2#1.16.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the re2#1.16.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Any suggestions on how to fix this?
You're actually encountering an issue that isn't necessarily related to gitlab-ci, but it actually related to node 14. Essentially that /root/.npm folder has bad permissions in node 14. You have three ways you can fix this:
Update to Node 15 (just change your image to node:15) which fixes the permission issue
Allow node permissions to scan the folder. This is insinuated by the error message you have in the above error where it tells you the directory can't be scanned. The easiest way to resolve this issue is to remove the -g off the second node install, which will make it deploy to the user folder instead of global. Since you're rebuilding the container every time and using the same user each time, the -g to install globally is redundant in this case.
Install Firebase using the standalone method to get the CLI instead of using NPM to install it. You can do this in a docker container using curl -sL firebase.tools | sed 's/sudo //g' | bash
Hopefully this helps!
I want to run a react native app by those commands:
npm i -g expo-cli
expo init myapp
cd myapp
npm start
but I get the following error and the metro boundler not work:
Opening DevTools in the browser... (press shift-d to disable)
Error: spawn powershell ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\nathan-hp\AppData\Roaming\npm-cache\_logs\2020-09-22T14_48_10_269Z-debug.log
I added this to the path:
C:\Windows\System32
but I still get the error above
ok, that was the solution:
the problem was:
Error: spawn powershell ENOENT
so I need to add:
C:\Windows\System32\WindowsPowerShell\v1.0
to the path.
I openned Windows PowerShell as admin and run:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
run npm start again in the cmd and then metro boundler was openned
I did that commands yesterday but somehow it didnt work, guess I have missed something.
The full explanation can be found here:
https://www.youtube.com/watch?reload=9&v=nfX7HtNiCZI