{"id":1583,"date":"2026-07-03T07:40:56","date_gmt":"2026-07-03T07:40:56","guid":{"rendered":"https:\/\/razvanvancea.ro\/blog\/?p=1583"},"modified":"2026-07-03T07:46:06","modified_gmt":"2026-07-03T07:46:06","slug":"using-npm-prefix-to-run-scripts-from-a-nested-package-json","status":"publish","type":"post","link":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/","title":{"rendered":"Using npm &#8211;prefix to Run Scripts from a Nested package.json"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1583\" class=\"elementor elementor-1583\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-38488ad elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"38488ad\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9c90403\" data-id=\"9c90403\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6ae4ece elementor-widget elementor-widget-text-editor\" data-id=\"6ae4ece\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"isSelectedEnd\">npm has an interesting flag called <code dir=\"ltr\">--prefix<\/code> that can be useful when you have multiple <code dir=\"ltr\">package.json<\/code> files in the same project.<\/p><p>A practical example is the following structure:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f8df077 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f8df077\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0cc6eee\" data-id=\"0cc6eee\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ffde95a elementor-widget elementor-widget-text-editor\" data-id=\"ffde95a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>project-root\/ <br \/>    package.json <br \/>    tests\/ package.json<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-228ec39 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"228ec39\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-860bdf2\" data-id=\"860bdf2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6ebf0dd elementor-widget elementor-widget-text-editor\" data-id=\"6ebf0dd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"isSelectedEnd\">In the project root, you may have a <code dir=\"ltr\">package.json<\/code> dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.<\/p><p class=\"isSelectedEnd\">Separately, the project may contain a <code dir=\"ltr\">tests<\/code> folder with its own <code dir=\"ltr\">package.json<\/code>, dedicated to test-related packages. For example, this is where you might keep dependencies and scripts for Playwright, Cypress, or other automated testing tools.<\/p><p class=\"isSelectedEnd\">Both <code dir=\"ltr\">package.json<\/code> files can define their own scripts.<\/p><p>For example, in <code dir=\"ltr\">tests\/package.json<\/code>, you might have:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-52f0bda elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"52f0bda\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-aaf1061\" data-id=\"aaf1061\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-088e733 elementor-widget elementor-widget-image\" data-id=\"088e733\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"640\" height=\"243\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-1024x389.png\" class=\"attachment-large size-large wp-image-1585\" alt=\"tests-pw\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-1024x389.png.webp 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-300x114.png.webp 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-768x292.png.webp 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-850x323.png.webp 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-24x9.png.webp 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-36x14.png.webp 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40-48x18.png.webp 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40.png.webp 1184w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-015a1e8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"015a1e8\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-55a47f6\" data-id=\"55a47f6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d673b27 elementor-widget elementor-widget-text-editor\" data-id=\"d673b27\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>A commonly used approach, when running the command from the project root, is:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2d0c4c3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2d0c4c3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-baa7e55\" data-id=\"baa7e55\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c58ebab elementor-widget elementor-widget-text-editor\" data-id=\"c58ebab\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>cd tests &amp;&amp; npm run e2e<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-44057f0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"44057f0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-12e6760\" data-id=\"12e6760\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-39483f0 elementor-widget elementor-widget-text-editor\" data-id=\"39483f0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"isSelectedEnd\">This works, but it requires changing the current directory before running the script.<\/p><p class=\"isSelectedEnd\">An alternative approach is to use <code dir=\"ltr\">--prefix<\/code> directly from the project root:<\/p><pre dir=\"ltr\"><code dir=\"ltr\"><\/code><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e23adca elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e23adca\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c966c2c\" data-id=\"c966c2c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-03ae0e6 elementor-widget elementor-widget-text-editor\" data-id=\"03ae0e6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>npm --prefix tests run e2e<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f80bce2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f80bce2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-08250a2\" data-id=\"08250a2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e46ec5f elementor-widget elementor-widget-text-editor\" data-id=\"e46ec5f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"isSelectedEnd\">In the example above, <code dir=\"ltr\">tests<\/code> is the path to the folder that contains the target <code dir=\"ltr\">package.json<\/code>, and <code dir=\"ltr\">e2e<\/code> is the script defined inside <code dir=\"ltr\">tests\/package.json<\/code>.<\/p><p>In other words, you are telling npm: \u201crun this command in the context of this folder.\u201d<br \/><br \/>One benefit is that you can also expose this from the root <code dir=\"ltr\">package.json<\/code>:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-cb2027f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"cb2027f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8d75f2f\" data-id=\"8d75f2f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e1fd696 elementor-widget elementor-widget-image\" data-id=\"e1fd696\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"98\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-1024x156.png\" class=\"attachment-large size-large wp-image-1586\" alt=\"\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-1024x156.png.webp 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-300x46.png.webp 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-768x117.png.webp 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-850x129.png.webp 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-24x4.png.webp 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-36x5.png.webp 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04-48x7.png.webp 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.44.04.png.webp 1330w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6e1e2b8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6e1e2b8\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cf1325d\" data-id=\"cf1325d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7dac69f elementor-widget elementor-widget-text-editor\" data-id=\"7dac69f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Then, from the project root, you can simply run:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1ebcf70 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1ebcf70\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e5ac006\" data-id=\"e5ac006\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-775aa2b elementor-widget elementor-widget-text-editor\" data-id=\"775aa2b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>npm run e2e<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-44e1a1b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"44e1a1b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5f9ba1b\" data-id=\"5f9ba1b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3bcf2de elementor-widget elementor-widget-text-editor\" data-id=\"3bcf2de\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"isSelectedEnd\">and npm will execute the <code dir=\"ltr\">e2e<\/code> script defined in <code dir=\"ltr\">tests\/package.json<\/code>.<\/p><p>It is a small detail, but a useful one, especially in projects where automated tests are organized as a separate sub-project with their own dependencies and scripts.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-22f31cb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"22f31cb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e30e630\" data-id=\"e30e630\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e511124 elementor-widget elementor-widget-spacer\" data-id=\"e511124\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e92f011 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e92f011\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0b30ca0\" data-id=\"0b30ca0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a65efa7 elementor-widget elementor-widget-text-editor\" data-id=\"a65efa7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Enjoyed this article?<br \/>I share more practical automation tips on\u00a0<a href=\"https:\/\/www.youtube.com\/c\/LearnwithRV\/videos\" target=\"_blank\" rel=\"noopener\"><strong>YouTube<\/strong><\/a>\u00a0and\u00a0<a href=\"https:\/\/www.linkedin.com\/in\/razvanvancea\/\" target=\"_blank\" rel=\"noopener\"><strong>LinkedIn<\/strong><\/a>.<\/p><p><strong>Need structured guidance instead of learning alone?<\/strong><br \/>I offer\u00a0<strong>1-on-1 mentoring<\/strong>\u00a0&#8211; learn more \u2192\u00a0<strong><a href=\"https:\/\/razvanvancea.ro\/1on1.html\" target=\"_blank\" rel=\"noopener\">HERE<\/a><\/strong><\/p><p>Or email me at\u00a0<strong>iamqarv [at] gmail [dot] com<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>npm has an interesting flag called &#8211;prefix that can be useful when you have multiple&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[10],"tags":[],"class_list":["post-1583","post","type-post","status-publish","format-standard","hentry","category-programming"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Razvan Vancea\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Learn with RV - Tech Blog - #testautomation #qa #programming #linux #devops\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-03T07:40:56+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-03T07:46:06+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/razvanvancea\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@RazvanVancea\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@RazvanVancea\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#blogposting\",\"name\":\"Using npm \\u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog\",\"headline\":\"Using npm &#8211;prefix to Run Scripts from a Nested package.json\",\"author\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrv\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Screenshot-2026-07-03-at-10.41.40.png\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#articleImage\",\"width\":1184,\"height\":450,\"caption\":\"tests-pw\"},\"datePublished\":\"2026-07-03T07:40:56+00:00\",\"dateModified\":\"2026-07-03T07:46:06+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#webpage\"},\"articleSection\":\"Programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#listItem\",\"name\":\"Using npm &#8211;prefix to Run Scripts from a Nested package.json\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#listItem\",\"position\":3,\"name\":\"Using npm &#8211;prefix to Run Scripts from a Nested package.json\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\",\"name\":\"RV\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#personImage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1790847588\",\"width\":96,\"height\":96,\"caption\":\"RV\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/razvanvancea\\\/\",\"https:\\\/\\\/twitter.com\\\/RazvanVancea\",\"https:\\\/\\\/www.youtube.com\\\/@LearnwithRV\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/razvanvancea\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrv\\\/#author\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrv\\\/\",\"name\":\"Razvan Vancea\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#authorImage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/356548feb901191539c03dd4a0498f58.jpg?ver=1790847589\",\"width\":96,\"height\":96,\"caption\":\"Razvan Vancea\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#webpage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/\",\"name\":\"Using npm \\u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog\",\"description\":\"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\\\/ package.json tests\\\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2026\\\/07\\\/03\\\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrv\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrv\\\/#author\"},\"datePublished\":\"2026-07-03T07:40:56+00:00\",\"dateModified\":\"2026-07-03T07:46:06+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/\",\"name\":\"Learn with RV - Tech Blog\",\"description\":\"#testautomation #qa #programming #linux #devops\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog","description":"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,","canonical_url":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#blogposting","name":"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog","headline":"Using npm &#8211;prefix to Run Scripts from a Nested package.json","author":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrv\/#author"},"publisher":{"@id":"https:\/\/razvanvancea.ro\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2026\/07\/Screenshot-2026-07-03-at-10.41.40.png","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#articleImage","width":1184,"height":450,"caption":"tests-pw"},"datePublished":"2026-07-03T07:40:56+00:00","dateModified":"2026-07-03T07:46:06+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#webpage"},"isPartOf":{"@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#webpage"},"articleSection":"Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/razvanvancea.ro\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/razvanvancea.ro\/blog\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#listItem","name":"Using npm &#8211;prefix to Run Scripts from a Nested package.json"},"previousItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#listItem","position":3,"name":"Using npm &#8211;prefix to Run Scripts from a Nested package.json","previousItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/programming\/#listItem","name":"Programming"}}]},{"@type":"Person","@id":"https:\/\/razvanvancea.ro\/blog\/#person","name":"RV","image":{"@type":"ImageObject","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#personImage","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/litespeed\/avatar\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1790847588","width":96,"height":96,"caption":"RV"},"sameAs":["https:\/\/www.facebook.com\/razvanvancea\/","https:\/\/twitter.com\/RazvanVancea","https:\/\/www.youtube.com\/@LearnwithRV","https:\/\/www.linkedin.com\/in\/razvanvancea"]},{"@type":"Person","@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrv\/#author","url":"https:\/\/razvanvancea.ro\/blog\/author\/iamrv\/","name":"Razvan Vancea","image":{"@type":"ImageObject","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#authorImage","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/litespeed\/avatar\/356548feb901191539c03dd4a0498f58.jpg?ver=1790847589","width":96,"height":96,"caption":"Razvan Vancea"}},{"@type":"WebPage","@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#webpage","url":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/","name":"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog","description":"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/razvanvancea.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/#breadcrumblist"},"author":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrv\/#author"},"creator":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrv\/#author"},"datePublished":"2026-07-03T07:40:56+00:00","dateModified":"2026-07-03T07:46:06+00:00"},{"@type":"WebSite","@id":"https:\/\/razvanvancea.ro\/blog\/#website","url":"https:\/\/razvanvancea.ro\/blog\/","name":"Learn with RV - Tech Blog","description":"#testautomation #qa #programming #linux #devops","inLanguage":"en-US","publisher":{"@id":"https:\/\/razvanvancea.ro\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Learn with RV - Tech Blog - #testautomation #qa #programming #linux #devops","og:type":"article","og:title":"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog","og:description":"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,","og:url":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/","article:published_time":"2026-07-03T07:40:56+00:00","article:modified_time":"2026-07-03T07:46:06+00:00","article:publisher":"https:\/\/www.facebook.com\/razvanvancea","twitter:card":"summary_large_image","twitter:site":"@RazvanVancea","twitter:title":"Using npm \u2013prefix to Run Scripts from a Nested package.json - Learn with RV - Tech Blog","twitter:description":"npm has an interesting flag called --prefix that can be useful when you have multiple package.json files in the same project.A practical example is the following structure: project-root\/ package.json tests\/ package.json In the project root, you may have a package.json dedicated to development-related packages, such as build tools, linting, formatting, or other general project scripts.Separately,","twitter:creator":"@RazvanVancea"},"aioseo_meta_data":{"post_id":"1583","title":null,"description":null,"keywords":null,"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2026-07-03 07:37:12","updated":"2026-09-04 08:26:32","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/razvanvancea.ro\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/razvanvancea.ro\/blog\/category\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUsing npm \u2013prefix to Run Scripts from a Nested package.json\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/razvanvancea.ro\/blog\/"},{"label":"Programming","link":"https:\/\/razvanvancea.ro\/blog\/category\/programming\/"},{"label":"Using npm &#8211;prefix to Run Scripts from a Nested package.json","link":"https:\/\/razvanvancea.ro\/blog\/2026\/07\/03\/using-npm-prefix-to-run-scripts-from-a-nested-package-json\/"}],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/1583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/comments?post=1583"}],"version-history":[{"count":4,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/1583\/revisions"}],"predecessor-version":[{"id":1589,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/1583\/revisions\/1589"}],"wp:attachment":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/media?parent=1583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/categories?post=1583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/tags?post=1583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}