I am testing a JavaScript app that is hung up on an 'invalid ELF header'.
A wide open search finds multiple solutions.
Suggested solutions (in no particular order:)
add .dockerignore
add node_modules
install npm
rm -rf node_modules
add bcrypt("*") to package.json
npm install --global
npm
install -g node#6.17.1
use nvm to install node.js and npm
npm rebuild bcryptjs / bcrypt.js
npm rebuild bcrypt --build-from-source
rm -rf node_modules
Trying them at random has not helped. I am using a Jelastic platform to run a server.js app that was built in Eclipse on Windows 10. The app worked in localhost. So, I expected it to run in a Jelastic environment. But, I have exhausted vendor support for ERR_DLopen_FAILED.
Related
I am facing this error when I am trying to do a git push on Intellj.
It's a similar issue to this one but opposite ( That one is 'darwin-x64' binaries cannot be used on the 'darwin-arm64v8')
I have tried all the solution from that post but the git push still throwing the same error.
Below is the error I recevied when I do a git push.
Error in "/Users/xxx/Projects/cpss/node_modules/gatsby-transform
er-sharp/gatsby-node.js": 'darwin-x64' binaries cannot be used on the
'darwin-arm64v8' platform. Please remove the 'node_modules/sharp' directory and
run 'npm install' on the 'darwin-arm64v8' platform.
Error:'darwin-x64' binaries cannot be used on the 'darwin-arm64v8' platform.
Please remove the 'node_modules/sharp' directory and run 'npm install' on the
'darwin-arm64v8' platform.
I have tried to delete the node_modules/sharp and run npm install but it does not work.
Can someone explains to me how can I run npm install on 'darwin-arm64v8' platform?
Thank you.
The answer here resolved it for me:
Run brew reinstall vips. Then delete the node_modules folder and install all dependencies again (with npm install or yarn).
delete the node_modules/sharp and run npm install --arch=arm64 --platform=darwin sharp
https://sharp.pixelplumbing.com/install#cross-platform
I installed the expo cli with
npm i -g exp
then I run
exp
and I get
-bash: exp: command not found
I'm guessing I didn't add exp to path. So how do I do this properly? Nothing I've tried so far works.
This suggested 3 steps solution worked for me:
First check if ~/.npm-global/bin is in your path: echo $PATH. If it isn’t there, you will need to add it to the path.
Open up ~/.bash_profile then add the following line to the bottom: export PATH=$PATH:~/.npm-global/bin
Finally, back in the shell, type: source ~/.bash_profile
Hopefully that will have fixed your problem.
1. Find the path where expo is globally installed by npm:
npm bin -g
2. Add path from Step 1 to paths file:
sudo vi /etc/paths
3. Restart the Terminal
You should try npx expo init <your_app_name> to test.
It worked for me.
I also had a hard time getting expo command to work on Mac. Here are the steps I took to get it working.
npm root -g shows the directory the global modules are installed in:
/usr/local/Cellar/node/11.7.0/lib/node_modules
That directory might be different for you. After confirming expo is in there, edit ~/.bash_profile and add the line:
export PATH=$PATH:/usr/local/Cellar/node/11.7.0/bin
Save & exit, then run source ~/.bash_profile
Now the expo command should function as intended.
try sudo npm install --global expo-cli
this worked for me.
➜ MobileDev git:(campaigns-responsive) ✗ expo whoami
› Not logged in, run expo login to authenticate
➜ MobileDev git:(campaigns-responsive) ✗ expo init App
✔ Choose a template: › blank a minimal app as clean as an empty canvas
✔ Downloaded and extracted project files.
📦 Using npm to install packages.
✔ Installed JavaScript dependencies.
✅ Your project is ready!
To run your project, navigate to the directory and run one of the following npm commands.
- cd App
- npm start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- npm run android
- npm run ios
- npm run web
exp was replaced with expo
To install Expo CLI, just run npm install -g expo-cli (or yarn global add expo-cli, whichever you prefer).
Following on this issue, I found I had multiple global folders so I started using a .npm-global folder as shown here: https://docs.npmjs.com/getting-started/fixing-npm-permissions
And now it's all clean and in control.
I had a similar issue.
-bash: expo: command not found
It turns out the command to install expo
npm install -g expo-cli was referencing an older version of node on my machine; when checked using npm root -g.
So I had to uninstall nvm/node, deleted any remnant folders & files of .nvm and shortcuts for nvm in /usr/local. Then reinstalled node and ran npm install -g expo-cli again.
That fixed my issue.
sudo npm install --unsafe-perm -g expo-cli
If you're using git bash on windows, add npm path to your system path variables. Generally located on this location:
C:\Users\<Username>\AppData\Roaming\npm
Then open the bash and command npm start. Hope this will help.
I solved it by putting this in my PATH environment variable / user variable:
C:\Users\{userName}\node_modules\.bin
yarn expo start
Worked for me.
npx create-expo-app project-name
I scaffold an app using jhipster which is microservice gateway using cassandra db and using maven to build which was building fine after scaffold.i ran gulp command to for the live reload of ui.
i made a change slighlty in navbar and home page of it.
which was also working file & made some changes in the json files of home & navbar & do some minor changes as adding the search box and other.
it failed to reload. I stop the gulp & maven & restarted them.
maven is building but again not loading the site in localhost
when i ran gulp it is showing me this error.
gulp
fs.js:952
return binding.readdir(pathModule._makeLong(path), options.encoding);
^
Error: ENOENT: no such file or directory, scandir '/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:952:18)
at Object.getInstalledBinaries (/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/lib/extensions.js:121:13)
at foundBinariesList (/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/lib/binding.js:15:30)
at Object.<anonymous> (/home/hartron/foodnetteam/codebase/mandi/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
Could anyone tell me solution for this
I sometimes also get this error when starting my gulp server. My workaround is to just run:
npm rebuild node-sass
And then gulp starts nicely afterward.
Here's what worked for me
$npm update
$npm install
$node node_modules/node-sass/scripts/install.js
$npm rebuild node-sass
For my case it helps only after doing this command:
node node_modules/node-sass/scripts/install.js
And then there will be /node_modules/node-sass/vendor folder
Some files may not be available in the local version of NodeJS, and sometimes NodeJS does not send a message about it. In this case --force is helpful.
npm install node-sass --force
or
npm rebuild node-sass --force
rebuild node-sass or just reinstall everything in case node-sass rebuild of doesn't work.
npm rebuild node-sass
or
rm -rf node_modules && npm install
or
npm rebuild
or
npm ci
or
just delete node_modules manually and package-lock.json and run npm i
The vendor directory is created during npm install. Try deleting your
node_modules and running npm install.
It is a problem with older version of node-sass. It doesn't create vendor folder in node_modules/node-sass. I have updated the version of node-sass and it worked fine for me.
My older version of node-sass was 3.1.0
I simply did:
npm install node-sass#3.7.0
This should solve your problem as well.
I just fixed this error. It was because I was trying to run the project from the wrong folder.
Make sure you have the config.json file. Then do the npm install and npm start.
This might give this error if you don't have this config file.
No need to delete node modules, its because of your sass-loader version is different
Delete package-lock.json
npm uninstall node-sass --save
npm i node-sass --save
delete the node-sass folder from node\npm-cache
npm rebuild node-sass
I did the below code,
sudo npm rebuild node-sass
mvn clean install
Update your gulp-sass in package.json with new version
"gulp-sass": "3.1.0" // 3.1.0 or later
This is the link which i follow https://github.com/dlmanning/gulp-sass/issues/508
I am using TeamCity as my CI server(mac).I am trying to build a web project. When I use grunt serve or grunt buildproduction after changing directory to the cloned folder,it's working perfectly fine.But when I do this via TeamCity server it is giving an error You need to have Ruby and Compass installed and in your system PATH for this task to work and gets aborted due to warnings. Ruby and Compass is already installed in the server.Please help me on this.
rm -rf $(pwd)/node_modules/*
rm -rf $(pwd)/bower_components/*
npm cache clear
npm install
npm install bower
npm install grunt-ftp-push --save-dev
bower install
grunt buildproduction
This is the Command Line buildstep which I used in Teamcity..
I would say you probably use a different user or the shell environment is different (interactive vs non-interactive) when you run these commands manually and when it runs through TC it can't find those packages in the environment/PATH
I have been searching for a solution for two days now to setup Phonegap on my Windows 8.1
system without any success.
Whenever I try to install Phonegap through npm I get an error that I think has to do
with Cordova(-lib).
To install Phonegap I had to install Node.js (v0.10.28) on my system. After this I opened up Windows Powershell and issued the following command like instructed on the Phonegap website:
npm install -g phonegap
Output: (This is the only part of the error)
error notarget No compatible version found: cordova-lib#'lorinbeer/cordova-lib.git#configparser_module'
error notarget Valid install targets:
error notarget ["0.21.2","0.21.3"]
error notarget
error notarget This is most likely not a problem with npm itself.
error notarget In most cases you or one of your dependencies are requesting
error notarget a package version that doesn't exist.
I also tried installing just Cordova through the npm and then install Phonegap, but that
didn't solve anything either.
Running the Powershell with administrator rights also didn't help and tried solutions of other people who also had problems setting up Phonegap, but nothing works.
I really hope that someone could help me out here.
Thanks in advance.
Download the older version. I think there was a problem in the new one
npm install -g phonegap#3.4
I tried this and worked for me.
I had the same issue yesterday. If you check npm-debug.log, you'll notice that there is a permission issue ("Permission denied") when npm tries to access the cordova-lib git repository url. Actually, cordova-lib is a dependency for phonegap. So, it can't install it and I think that's why you get that error.
So, I tried this: install cordova-lib first then Phonegap. Yet, it still won't work; npm does not seem to check if cordova-lib is installed before trying to do it.
At this point, what I could do is to change the repository from which it retrieves cordova-lib. Here is the NPM install syntax:
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install <pkg>
npm install <pkg>#<tag>
npm install <pkg>#<version>
npm install <pkg>#<version range>
This means I can install from a tar.gz file. Great! So, I just went to this page https://www.npmjs.org/package/phonegap to check the phonegap repository and performed these steps:
Download the zip of phonegap-cli repo (https://github.com/phonegap/phonegap-cli/archive/master.zip)
Unzip it
Open the package.json file and find the cordova-lib entry in dependencies (line 32)
Change the value to 0.21.3 which is the last version.
Recreate an archive of the folder to the tar.gz format
Open your CLI and run this command:
npm install -g path/to/archive/phonegap-cli-master.tar.gz
It should work now.
Hope that help!
I had a similar problem today too on Mac, even after Lorenzo said it should be all fine. Just running this:
sudo npm install -g phonegap
... produced loads of errors like this:
error: file ./objects/pack/pack-48c0ff4147fb7e8922546c4a857b98a1cb48e01f.pack is far too short to be a packfile
I combined Lorenzo and arpan shah's solutions:
sudo npm install -g phonegap#3.4
sudo npm cache clean
sudo npm update -g phone gap
... and it seemed to magically work.
Problem
We published with a dependency on a branch of cordova-lib. This fork appears unavailable when lots of requests are coming through (I think). One way or another, it's unreliable.
Changing the dependency to 0.21.3 will cause commands to fail, but will allow the install.
Solutions
update the 'cordova-lib' dependency to the npm published version '0.21.3'
**note, this will allow the install, but other phonegap commands will fail
wait for about 20 minutes, then npm update -g phonegap
testing an update to resolve this issue
further updates momentarily
update
We've pushed version 3.5.0-0.20.3 which should resolve this issue
$ npm update -g phonegap
if that doesn't work, try
$ npm cache clean
and reinstall phonegap
I tryed above comamnds npm cache clear and reinstall phoegap. It downloaded all libs but not command line scripts (phonegap command had still 3.4 as version). I found that better was to give command: npm install -g cordova (v 3.5)!