{"id":596,"date":"2020-10-13T13:53:47","date_gmt":"2020-10-13T05:53:47","guid":{"rendered":"https:\/\/www.cxybj.com\/?p=596"},"modified":"2020-10-13T13:53:48","modified_gmt":"2020-10-13T05:53:48","slug":"centos7-laravel-%e4%bd%bf%e7%94%a8%e5%91%bd%e4%bb%a4npm-install%e6%97%b6%e6%8a%a5%e9%94%99%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.cxybj.com\/?p=596","title":{"rendered":"centos7 laravel \u4f7f\u7528\u547d\u4ee4npm install\u65f6\u62a5\u9519\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"\n<p><strong>\u9519\u8bef\u4e00\uff1apermission denied,mkdir&#8217;&#8230;&#8230;node-sass\/build&#8217;<\/strong><\/p>\n\n\n\n<p>\u9700\u8981\u589e\u52a0&#8211;unsafe-perm \u547d\u4ee4\u5982\u4e0b\uff1a<br>sudo npm install &#8211;unsafe-perm<br>\u7136\u540e\u8fd0\u884cnpm install<br>npm run dev\u6216\u8005npm run wath-poll<br><br><\/p>\n\n\n\n<p><strong>\u9519\u8bef\u4e8c\uff1aERR xxx .. socket,symbol link is not supported &#8230;<\/strong><\/p>\n\n\n\n<p><strong>1.\u4fee\u6539\u9879\u76ee\u6839\u76ee\u5f55\u4e0bpackage.json\u00a0 \u5220\u9664 scripts \u4e0b\u7684 cross-env\u00a0 \u5982\u4e0b\u6240\u793a<\/strong><\/p>\n\n\n\n<p>&#8220;scripts&#8221;: {<br>&#8220;dev&#8221;: &#8220;npm run development&#8221;,<br>&#8220;development&#8221;: &#8220;NODE_ENV=development node_modules\/webpack\/bin\/webpack.js &#8211;progress &#8211;hide-modules &#8211;config=node_modules\/laravel-mix\/setup\/webpack.config.js&#8221;,<br>&#8220;watch&#8221;: &#8220;npm run development &#8212; &#8211;watch&#8221;,<br>&#8220;watch-poll&#8221;: &#8220;npm run watch &#8212; &#8211;watch-poll&#8221;,<br>&#8220;hot&#8221;: &#8220;NODE_ENV=development node_modules\/webpack-dev-server\/bin\/webpack-dev-server.js &#8211;inline &#8211;hot &#8211;config=node_modules\/laravel-mix\/setup\/webpack.config.js&#8221;,<br>&#8220;prod&#8221;: &#8220;npm run production&#8221;,<br>&#8220;production&#8221;: &#8220;NODE_ENV=production node_modules\/webpack\/bin\/webpack.js &#8211;no-progress &#8211;hide-modules &#8211;config=node_modules\/laravel-mix\/setup\/webpack.config.js&#8221;<br>},<\/p>\n\n\n\n<p>2.<strong>\u6267\u884c\u547d\u4ee4\uff1a<\/strong><\/p>\n\n\n\n<p>npm cache clean &#8211;force<br>npm install &#8211;no-bin-links<br>npm run dev<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9519\u8bef\u4e00\uff1apermission denied,mkdir&#038;#8 &hellip; <a href=\"https:\/\/www.cxybj.com\/?p=596\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[135,2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/596"}],"collection":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=596"}],"version-history":[{"count":1,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/596\/revisions"}],"predecessor-version":[{"id":597,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/596\/revisions\/597"}],"wp:attachment":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}