Error: ENOENT: no such file or directory for react-ionicons - node.js

I installed react-ionicons by using the below comment
npm i react-ionicons
and in my js file, I have the below code. I was able to see the icon in my screen, however in the console. I got lots of error and warning.
import { Airplane } from 'react-ionicons'
const res = () => {
<Airplane
color={'#fff'}
title={'airplane'}
height="30px"
width="30px"
/>
}
.....
WARNING in ./node_modules/react-ionicons/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/az/project1/node_modules/react-ionicons/lib/WomanOutline.js.map' file: Error: ENOENT: no such file or directory, open '/Users/az/project1/node_modules/react-ionicons/lib/WomanOutline.js.map'
WARNING in ./node_modules/react-ionicons/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/az/project1/node_modules/react-ionicons/lib//WomanSharp.js.map' file: Error: ENOENT: no such file or directory, open '/Users/az/project1/node_modules/react-ionicons/lib//WomanSharp.js.map'
WARNING in ./node_modules/react-ionicons/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/az/project1/node_modules/react-ionicons/lib/index.js.map' file: Error: ENOENT: no such file or directory, open '/Users/az/project1/node_modules/react-ionicons/lib/index.js.map'
webpack compiled with 1302 warnings
Is that mean I did not install react-ionicons correctly ?

I have found the fix by the link below
[blog]: Failed to parse source map... Error: ENOENT: no such file or directory
Create the file .env in the project folder and type the key
GENERATE_SOURCEMAP=false

Related

<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies

Trying to run a project on my VPS but im constantly getting this error flagged up. i have tried clearing and installing everything fresh but the problem still occurs. any help would be greatly appreciated.
<t> [webpack.cache.PackFileCacheStrategy] restore cache container: 64.298367 ms
info - Creating an optimized production build ... [webpack.cache.PackFileCacheStrategy] Pack got invalid because of write to: Compilation/modules|/home/admin/web/server/public_html/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[2].oneOf[2].use!/home/admin/web/server/public_html/node_modules/next/dist/pages/_error.js
[webpack.cache.PackFileCacheStrategy] Storing pack...
[webpack.cache.PackFileCacheStrategy] Capturing build dependencies... (/home/admin/web/server/public_html/next.config.js, /home/admin/web/server/public_html/node_modules/next/dist/compiled/, /home/admin/web/server/public_html/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js)
info - Creating an optimized production build .<t> [webpack.cache.PackFileCacheStrategy] resolve build dependencies: 90.189044 ms
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Error snapshotting file timestamp hash combination of /home/admin: Error: EACCES: permission denied, open '/home/admin'
<t> [webpack.cache.PackFileCacheStrategy] snapshot build dependencies: 1.801434 ms
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
[webpack.cache.PackFileCacheStrategy] Error: Unable to snapshot resolve dependencies
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:70754:13
at jobError (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47008:5)
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47071:10
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47968:13
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:131419:5
at Hook.eval [as callAsync] (eval at create (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:23493:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:23295:14)
at AsyncQueue._handleResult (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:131389:21)
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:131372:11
at ReadFileContext.<anonymous> (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47917:12)
[webpack.cache.PackFileCacheStrategy] No pack exists at /home/admin/web/server/public_html/.next/cache/webpack/edge-server-production.pack: Error: ENOENT: no such file or directory, stat '/home/admin/web/server/public_html/.next/cache/webpack/edge-server-production/index.pack'
<t> [webpack.cache.PackFileCacheStrategy] restore cache container: 19.478739 ms
[webpack.cache.PackFileCacheStrategy] No pack exists at /home/admin/web/server/public_html/.next/cache/webpack/client-production.pack: Error: ENOENT: no such file or directory, stat '/home/admin/web/server/public_html/.next/cache/webpack/client-production/index.pack'
<t> [webpack.cache.PackFileCacheStrategy] restore cache container: 9.156366 ms
info - Creating an optimized production build ... [webpack.cache.PackFileCacheStrategy] Pack got invalid because of write to: Compilation/modules|/home/admin/web/server/public_html/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=next%2Fdist%2Fpages%2F_app&page=%2F_app!
[webpack.cache.PackFileCacheStrategy] Storing pack...
[webpack.cache.PackFileCacheStrategy] Capturing build dependencies... (/home/admin/web/server/public_html/next.config.js, /home/admin/web/server/public_html/node_modules/next/dist/compiled/, /home/admin/web/server/public_html/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js, /home/admin/web/server/public_html/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js)
info - Creating an optimized production build .<t> [webpack.cache.PackFileCacheStrategy] resolve build dependencies: 102.05922 ms
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Error snapshotting file timestamp hash combination of /home/admin: Error: EACCES: permission denied, open '/home/admin'
<t> [webpack.cache.PackFileCacheStrategy] snapshot build dependencies: 2.324734 ms
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
[webpack.cache.PackFileCacheStrategy] Error: Unable to snapshot resolve dependencies
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:70754:13
at jobError (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47008:5)
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47071:10
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47968:13
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:131419:5
at Hook.eval [as callAsync] (eval at create (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:23493:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:23295:14)
at AsyncQueue._handleResult (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:131389:21)
at /home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:131372:11
at ReadFileContext.<anonymous> (/home/admin/web/server/public_html/node_modules/next/dist/compiled/webpack/bundle5.js:47917:12)```
As stated in this discussion, the suitable soulution in your case seems to be
cd [your project]
npm install -g n
sudo n stable
rm -rf node_modules/
rm -f package-lock.json
npm install
I really can't reproduce the error so I'm not 100% confident this is going to work but you can give it a try and let us know.°
I also think you can skip the installation of a stable node version so, if you already have one, just try the clean npm install.
For me I just move my project to C:/ and return to work. But if you need to maintain the project in another disk, you can do this:
Go to your_project/node_modules/next/package.json
Change local in _where (Local in package)
Now you can start.
PS.: I don't know whats happening and a different form to change this package easily.
PS 2.: I google a lot, but didn't find anithing.

flutter run cannot access files of my secondary hard disk

I have a SSD and a HDD in my system.I am using ssd for store ubuntu and windows and saving my project files in HDD. But i flutter cant access files in the HDD.
It is throwing this error message
Oops; flutter has exited unexpectedly: "FileSystemException: Cannot delete file,
path = '/path to project/.flutter-plugins' (OS Error:
Read-only file system, errno = 30)".
Unable to generate crash report due to secondary error: FileSystemException: Cannot create file, path = '/path to project/flutter_01.log' (OS Error: Read-only file system, errno = 30)
Please report a bug at https://github.com/flutter/flutter/issues.
Oops; flutter has exited unexpectedly: "FileSystemException: Cannot delete file,
path = '/path to project/.flutter-plugins' (OS Error:
Read-only file system, errno = 30)".
Unable to generate crash report due to secondary error: FileSystemException: Cannot create file, path = '/path to project/flutter_01.log' (OS Error: Read-only file system, errno = 30)
Please report a bug at https://github.com/flutter/flutter/issues.
Unhandled exception:
ProcessExit: 1
#0 _handleToolError (package:flutter_tools/runner.dart:172:7)
#1 run.. (package:flutter_tools/runner.dart:86:7)
My secondary harddisk was mounting as read only file system.
I have remounted it to solve the issue.

Error while accessing .hdf5 file, shows error “OSError: Unable to open file ”

When I tried to open an .hdf5 file with h5py:
import h5py
file=h5py.open(".../f.hdf5",'r'),
The following error was raised:
h5py/h5f.pyx in h5py.h5f.open()
OSError: Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')
Solutions: The error could be solved for opening .hdf5 files as below:
file= h5py.File(file_path,'r')
close the files using file.close() or
import os
os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE"
Then the error while opening the file will be gone and you can keep working on that file.

when I'm run the gulp bundle command I'm getting below errors

I'm new to javascript world and I'm currecntly using jspm, gulp, typescript and babel when I run the command gulp bundle I'm getting this
[15:52:39] Finished 'build-system' after 1.95 s
[15:52:39] Finished 'build' after 2 s
[15:52:39] Starting 'bundle'...
[15:52:39] 'bundle' errored after 394 ms
[15:52:39] Error on fetch for animal.js at file:///D:/vetserve/Vetserve.Web/src/
Vetserve.Web.Appts/dist/animal.js
Error: ENOENT: no such file or directory, open 'D:\vetserve\Vetserve.Web
\src\Vetserve.Web.Appts\dist\animal.js.map'
at Error (native)

Fatal error: require_once(): Failed opening required 'pre.php' in /usr/share/tuleap/src/www/index.php

I have installed xampp and then tuleap in centos and gave /usr/share/tuleap/src/www as document root in /etc/httpd/conf/httpd.conf
When I hit the url, I am getting the following error:
Warning: require_once(pre.php): failed to open stream: No such file or directory in /usr/share/tuleap/src/www/index.php on line 9
Fatal error: require_once(): Failed opening required 'pre.php' (include_path='.:/opt/lampp/lib/php') in /usr/share/tuleap/src/www/index.php on line 9
I am also seeing that the document root points to /usr/share/tuleap/src/www and pre.php is not in this folder. Instead it is at include/pre.php I am totally confused on this directory structure. I didn't change any code after installing tuleap.
Please let me know how to fix this issue.
Thanks in advance!

Resources