tag:help.appveyor.com,2012-11-13:/discussions/problems/31313-npm-operation-not-permitted-renameAppVeyor: Discussion 2022-04-02T21:02:28Ztag:help.appveyor.com,2012-11-13:Comment/498051122022-01-28T14:32:53Z2022-01-28T14:32:53Znpm operation not permitted, rename<div><p>The solution was to remove the npm install from the beginning:<br>
npm -g install npm</p></div>devtag:help.appveyor.com,2012-11-13:Comment/498051122022-01-28T18:57:57Z2022-01-28T19:34:49Znpm operation not permitted, rename<div><p>I'm encountering the same issue and output as the above, with the error relating to the same package "node-gyp.DELETE\node_modules\@tootallnate"</p>
<ul>
<li>the above solution, simply removing the command, does not work (unless there is explanation missing)</li>
<li>npm install builds successfully in the local environment</li>
<li>I've tried moving 'npm install' to the install stage as mentioned in <a href="https://help.appveyor.com/discussions/problems/5290-npm-error-operation-not-permited-on-renaming-a-packagetgz">https://help.appveyor.com/discussions/problems/5290-npm-error-opera...</a></li>
</ul>
<p>config is attached. Would appreciate any leads</p></div>nbdeveloptag:help.appveyor.com,2012-11-13:Comment/498051122022-01-28T19:02:01Z2022-01-28T19:34:48Znpm operation not permitted, rename<div><p>Wrongly included a modified yml above. The one causing error is attached below</p></div>nbdeveloptag:help.appveyor.com,2012-11-13:Comment/498051122022-01-28T22:10:11Z2022-01-28T22:10:11Znpm operation not permitted, rename<div><p>@nbdevelop Are you running <code>npm -g install npm</code> as well?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/498051122022-01-31T11:51:38Z2022-01-31T11:51:42Znpm operation not permitted, rename<div><p>I'm not running <code>npm -g install npm</code>. Only the contents of the yml file.</p></div>nbdeveloptag:help.appveyor.com,2012-11-13:Comment/498051122022-01-31T17:02:46Z2022-01-31T17:02:46Znpm operation not permitted, rename<div><p>You don't need to install Node with Chocolatey - it's already pre-installed on AppVeyor VMs. Try changing <code>appveyor.yml</code> to the following:</p>
<pre>
<code>version: 0.2.{build}-{branch}
branches:
only:
- develop
image: Visual Studio 2019
install:
- ps: Install-Product node 12
build_script:
- cmd: >-
npm install
npm run build
test: off</code>
</pre>
<p>Also, if it dosn't help you could try removing <code>package-lock.json</code>.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/498051122022-01-31T19:23:13Z2022-01-31T19:23:17Znpm operation not permitted, rename<div><p>The above did not solve the problem, however I changed the install command to use 'ci' and removed our package-lock.json from gitignore (which I now understand is the correct way) and this solved the issue. Really appreciate the help - thank you!</p>
<pre>
<code>version: 0.2.{build}-{branch}
branches:
only:
- develop
image: Visual Studio 2017
install:
- ps: Install-Product node 12
build_script:
- cmd: >-
npm ci
npm run build
test: off```</code>
</pre></div>nbdeveloptag:help.appveyor.com,2012-11-13:Comment/498051122022-01-31T19:31:15Z2022-01-31T19:31:15Znpm operation not permitted, rename<div><p>Sounds great, thanks for the update!</p></div>Feodor Fitsner