Warning: session_start(): open(/tmp/sess_5aae801f18a7738784c3228aa2c67f95, O_RDWR) failed: Disk quota exceeded (122) in /home/wvyrfnwn/learnshareit.com/wp-content/plugins/learnpress/inc/class-lp-page-controller.php on line 1007

Warning: session_start(): Failed to read session data: files (path: /tmp) in /home/wvyrfnwn/learnshareit.com/wp-content/plugins/learnpress/inc/class-lp-page-controller.php on line 1007

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 719

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 719

Warning: ftp_mkdir() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 562

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/wvyrfnwn/learnshareit.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230
Error [err_package_path_not_exported]: package subpath in React - How To Solve It? - LearnShareIT

Error [err_package_path_not_exported]: package subpath in React – How To Solve It?

Error [err_package_path_not_exported]: package subpath

This article discusses the error “[err_package_path_not_exported]: package subpath” in React and finds out how to fix it.

Why does this error occur?

The error “[err_package_path_not_exported]: package subpath” often occurs in react web applications when the installed modules are no longer supported. In addition, if a version has a bug that you haven’t updated in time, it will cause conflicts in the project.

Solutions for the “[err_package_path_not_exported]: package subpatherror

Method 1: Update the packages

In the root directory of your project, open the terminal and run these commands:

npm update
npm audit fix

The npm update command will update all the packages to the latest version and install the missing packages.

The npm audit statement will search your entire project for any vulnerabilities. If vulnerabilities are found, appropriate remedial measures will be calculated. Run this command with the fix argument, and then the remedies will be applied.

If the above two statements don’t work, try re-running them with the --force argument:

npm update --force
npm audit fix --force

Method 2: Delete the node_modules folder

If the first method can’t help you fix the problem, try deleting your ‘node_modules’ and ‘package-log.json’ file, then run npm install.

rm -rf node_modules
rm -f package-lock.json
npm install

Sometimes, you should also clear the cache before running the command npm install. The reason is that different versions of dependencies or packages are installed and conflicting with each other will lead to conflicts. Clearing cache will allow you to reinstall packages and avoid errors.

npm cache clean
:: or
npm cache verify

Or you can also use the --force argument. This will force delete the cache on your machine if the above command does not work.

npm cache clean --force
:: or
npm cache verify --force

Note, you will see in the project there are two files: ‘package.json’ and ‘package-lock.json’. If you don’t pay close attention, it will easily cause mistakes. We delete ‘package-lock.json’, not ‘package.json’.

Method 3: Check the NodeJS version

Check the NodeJS version you are using. The cause of the error can also be because you have installed the latest version of NodeJS. Try downgrading to a more stable version of NodeJS – commonly known as LTS on the NodeJS homepage. 

To do that, run the following commands:

nvm uninstall 
nvm install --lts

The nvm install  -- lts command will automatically install the long-term supported version for NodeJS

Remember that, after successfully applying these above methods, please restart the IDE and the development server.

Summary

You have just found some recommended methods to fix the error “[err_package_path_not_exported]: package subpath” in React. I hope this information can help your project. Thanks for reading!

Maybe you are interested:

Leave a Reply

Your email address will not be published. Required fields are marked *