Ember-CLI error on changing a CSS file - ember-cli

I'm trying out Ember-CLI, and have encountered my first obscure problem (there were others, but… they're fixed). On trying to save a change in the app.css file, this happens:
file changed styles/app.css
EEXIST, file already exists '/Users/admin/projects/saves/tmp/caching-writer-dest-dir_fjlhTg.tmp'
Error: EEXIST, file already exists '/Users/admin/projects/saves/tmp/caching-writer-dest-dir_fjlhTg.tmp'
at Error (native)
at Object.fs.symlinkSync (fs.js:852:18)
at symlink (/Users/admin/projects/saves/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:82:14)
at Function.symlinkOrCopySync (/Users/admin/projects/saves/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:58:5)
at /Users/admin/projects/saves/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/index.js:103:21
at lib$rsvp$$internal$$tryCatch (/Users/admin/projects/saves/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16)
at lib$rsvp$$internal$$invokeCallback (/Users/admin/projects/saves/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17)
at lib$rsvp$$internal$$publish (/Users/admin/projects/saves/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11)
at lib$rsvp$asap$$flush (/Users/admin/projects/saves/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1290:9)
at process._tickCallback (node.js:355:11)
The closest match I can find is this ember-cli issue.
Update and fix:
I tried the following:
rm -rf node_modules tmp dist && npm cache clean
ember install
But the issue persisted (after also trying the add rimraf to dependencies and doing npm install rimraf, now removed again).
The actual solution
Then it occurred to me that I needed to npm update ember-cli, then the above commands again, after which all is working now :-)

Update: As per raytiley's comments, the issue is not with rimraf, and the offender (broccoli-caching-writer) should be fixed soon. Therefore, at this time, Step 1 should not be necessary if you're experiencing this problem now.
See the comments in the Github Issue
This looks like a recent issue with dependencies, specifically rimraf. Currently, users are having success with this solution:
First, add this to your package.json file: (Not needed anymore)
"dependencies": {
"rimraf": "2.2.8"
}
Secondly, type this into the command line to re-install your node items
rm -rf node_modules tmp dist && npm cache clean
ember install
Hope that helps!

Related

"Fixing missing packages and vulnerabilities in age-viewer package when installing from GitHub"

I am trying to install the age-viewer from GitHub by following these steps:
Cloning the repository
Changing directory to age-viewer
Running "npm run setup"
However, I am encountering issues with missing packages and 34 vulnerabilities (3 moderate, 22 high, 9 critical). I have attempted to resolve this by running "npm audit fix --force", but it did not work.
I am looking for a solution to fix the missing packages and vulnerabilities in the age-viewer package that I am trying to install from GitHub.
Cloning the age-viewer repository from GitHub
Changing directory to age-viewer
Running "npm run setup"
Running "npm audit fix --force" to resolve issues with missing packages and vulnerabilities
I encountered a similar error. Here is how I solved it:
Removed node_modules directory from root, frontend and backend folders.
Removed package-lock.json from root, frontend and backend folders.
Ensured node version is in range 14.16.0 - 14.21.2 (I switched to 14.16.0 using nvm)
Cd to root dir of the AGE-Viewer
npm run setup
npm run start
Hope this helps.
This error can arise due to a different reason. You can try some of the following steps to solve this error.
Try using node version 14.16.0.
If you are using WSL then make sure that the node version for your system's parent os and WSl is the same.
I had the same issue while installing, the 1st solution mentioned above worked for me [for ubuntu 22.04].
Try to use 14.16.0 version of node.
But if you are already using this version then try these steps:
npm cache clean --force
delete node_modules folder and package-lock.json file from your age-viewer root
directory.
delete node_modules folder and package-lock.json file from the frontend folder in age-viewer directory.
delete node_modules folder and package-lock.json file from the backend folder
in age-viewer directory.
npm run setup
npm run start
It works for me like this.

Error: Cannot find module 'nativescript-zxing'

I want to use ZXing in my NativeScript Angular app. I installed the plugin and I´m able to find it in my node_modules folder. But as I try to import the plugin, it says: "Cannot find module 'nativescript-zxing'
I tried reinstalling it, but the issue came back. I can't seem to find any related posts to that topic, as I´m not sure where the problem can be.
This is my import command:
import { ZXing } from 'nativescript-zxing'
I hope someone can help me out, or push me on the right track.
Remove node_modules folder using rm -rf node_modules/
add "nativescript-zxing": "^1.5.8" in your package.json file
npm install
Run the tns run ios
if running on Android, firstly run rm -rf node_modules/nativescript-zxing/platforms/android and than tns run android

How to fix 'Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Testing binary
Binary is fine
npm WARN rollback Rolling back node-pre-gyp#0.12.0 failed (this is probably harmless):
EPERM: operation not permitted, lstat 'C:\Users\orca
yoon\Documents\IonicProjects\starters\epic\node_modules\fsevents\node_modules'
npm notice created a lockfile as package-lock.json. You should commit
this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9
(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform
for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
added 1105 packages from 1050 contributors and audited 53269 packages in 445.94s
found 1 high severity vulnerability
run npm audit fix to fix them, or npm audit for details
First,
Run your command prompt or powershell as Administrator role. Then you'll get avoided with PERMISSION ERROR.
Second,
Ignore npm audit fix. It only suggests you to renovate all of your package.json dependencies up-to-date. You should preserve the settings clarified in package.json.
Third,
If you're working on ubuntu or OS X, you won't face this issue, I guess.
PS:
According to your reply, I'd like to think about the workaround.
Remove the local node_modules & package-lock.json
Clean npm cache by npm cache verify
Update the global npm by sudo npm i -g npm
Reinstall the local node_modules by npm i
Hope this might help.
I found a solution, this is what I did:
Open your package-lock.json.
Find node_modules/fsevents, inside this there is something called "os", I had only this:
"os": [
"darwin",
],
So my OS is windows 10 64 bits I just added my OS inside "os", the result is this:
"os": [
"darwin",
"win32"
],
then save and is solved, after doing this I could install the package I was trying to install that I couldn't.
As I got into the issue just today I read the first solution but tried one thing first
Remove package-lock.json and node_modules dir first
Run these commands and it should work.
rm -rf node_modules package-lock.json
npm install
worked like a charm maybe it'll help someone else.
When seeing this kind of message on ionic or anywhere else, do run npm audit fix and see if you can successfully follow the given advice to resolve all "high severity vulnerability" issues and contribute the resulting updated dependencies back to the given codebase.
What's happening here is that a package called chokidar is being used to "watch" filesystem directories for "events" (like files being added). chokidar is a wrapper for Linux-, Windows-, and Mac-specific filesystem-watching packages, of which fsevents is the Mac variant. So, I am pretty sure anything that uses chokidar is going to have fsevents as an optional dependency, but as others have said, this WARN message can be safely ignored, as chokidar supports all common desktop architectures.
If like me, you got this issue because of using two different package managers at the same time (E.g. yarn and npm), you can simply remove the lockfile and rerun your package manager.
rm package-lock.json
The lockfile will be regenerated the next time you run your package manager. I got this error while trying to upgrade the packages with npm upgrade. After deleting the lockfile, upgrade proceeded smoothly and the lockfile was created correctly.
This warning will appear if you added IOS as platform to your project and run npm i on Windows or Linux. As you can't build IOS packages on these systems anyway you can safely ignore this warning.
I had the same issue:
Deleted package-lock.json
npm install
viola, it worked for me
After opening the command prompt or PowerShell in the administrator mode, what helped me was following this answer here.
I ran the command:
npm i --force
and that seemed to fix the issue.
If you're seeing this error in a node Github workflow, you can update the runs-on value in node.js.yml to macos-latest and it will work. Worked for me anyways.
The critical breakthrough for me was actually simple:
yarn remove fsevents
I verified that it worked by ctrl + f in yarn.lock for 'fsevents'. Before removing it, it appeared 9 times, after removing it, only 8. So I knew it had some effect.
Extra info
After removing fsevents:
git add .
git commit -m "Removed fsevents"
git push heroku master
and it worked.
Note that I also had to run bin/webpack-dev-server to see if the assets would precompile (better to try this locally where you can quickly address any deficiencies, rather than on heroku where it will take time to build).
I fixed any missing libraries with something like yarn add '#rails/activestorage' '#rails/ujs' etc, and when the app went to heroku it worked.
You have to add win64 on package.json file
For example
{"os":"darwin,linux","arch":"any"} will replace with
{"os":"darwin,linux,win32,win64","arch":"any"}

Error whith ionic 3

I'm having this error with Ionic 3 for any command I launch even ionic -v
Error
at FatalException.Exception (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/errors.js:8:23)
at FatalException (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/errors.js:17:9)
at Config. (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/config.js:60:35)
at throw (native)
at rejected (/usr/lib/node_modules/ionic/node_modules/#ionic/cli-utils/dist/lib/config.js:5:65)
name: 'Exception', exitCode: 1, fatal: true
I tried uninstalling ionic then reinstalling but the error persisted.
Any help or recommendation would be very much appreciated.
Check the ionic config.json file, great chance it is empty or corrupt based on this error. To get to the file location do the following.
Open up your terminal and go to your root directory
cd /
Next get to the .ionic folder.
cd Users/<User>/.ionic
Once here check the config.json to see its contents. Like I said it is most likely empty or corrupt so go ahead and delete it, then reinstall Ionic and that should fix your issue.
Possibly try npm prune which removes unnecessary node file relative to you project
If all else fails then rm -rf node_modules then npm install(be careful with this as it clears all npm data)
delete node_module folder and re-run npm install command , it works .

Building emacs 24.1.50

I've just updated to Kubuntu 12.04. Everything works fine except for the latest custom-build emacs. It says now:
emacs: symbol lookup error: emacs: undefined symbol: gtk_window_set_has_resize_grip
So I've decided to re-build emacs. For that I've git pull the latest snapshot, and have done everything as I usually do, but now I get an error during compilation:
In file included from /home/boris/its/blds/emacs/lib-src/emacsclient.c:76:0:
../lib/getopt.h:196:8: error: redefinition of ‘struct option’
/usr/include/getopt.h:106:8: note: originally defined here
../lib/getopt.h:245:12: error: conflicting types for ‘getopt_long’
/usr/include/getopt.h:175:12: note: previous declaration of ‘getopt_long’ was here
../lib/getopt.h:249:12: error: conflicting types for ‘getopt_long_only’
/usr/include/getopt.h:179:12: note: previous declaration of ‘getopt_long_only’ was here
make[1]: *** [emacsclient] Error 1
make[1]: Leaving directory `/home/boris/its/blds/emacs/lib-src'
make: *** [lib-src] Error 2
Google search reveals almost nothing on these errors.
Edit:
The following solves it (thanks to JSON):
git pull
./autogen.sh
./configure --prefix=/home/boris/its/soft/Emacs_24.1.50
make bootstrap
make install
The simplest way is to use PPA: emacs-snapshot.
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot
I had these problems updating to Ubuntu 12.04, and got past it by going back to the instructions from INSTALL.BZR for first time checkout - it seems the configure file needs to be regenerated due to changes in libc in the new version of Ubuntu.
This is what I do to build emacs after a git pull (my script to do it nightly)
make distclean && autoreconf -i -I m4 && ./configure && make && sudo make install
i had the same problem than the op, and i just removed emacs from the system, and compiled from scratch.
and no, i didn't have to add a ppa, and every time i see an answer like that getting all the votes, it makes me wonder about stackexchange in general , it just misinforms and misleads others who may have the same problem.
and no, i said it once and i'll say it again, Just download the latest emacs from fsf.
let me add that getopt.h is part of libc6-dev (as json said). and libc6-dev is part of the required group like libjpeg libncurses libpng libtiff xlibs etc. remove it once and reinstall. the problem is with the configuration options path which need to be specified this time around in the prefix of emacs24 at the time of configuration. but neither autogen nor bootstrap are necessary, but just make and make install.
make maintainer-clean
./autogen.sh
./configure
make
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10108#8
I had the same issue as you but for the 24.5 tag. The problem was I didn't rerun autogen.sh to create a new configure script. I assumed that any untracked file would be listed by git status, though all the configuration output from autogen.sh is ignored in .gitignore.