提携先の制作会社さんから、「うちで使っているGulpの環境で作業して、制作物を納品してほしい」と頼まれ、zipにてnode_modules、gulpfile.js、package.json、package-lock.jsonを渡されたので、こちらでローカルにフォルダを生成し、その中にpackage.jsonを入れて(.browserslistrcも)VScode上のターミナルにて、『npm install』と打ち込むと、インストール途中で下記のようなエラーメッセージが出てしまいました。
npm
1npm ERR! syscall rename 2npm ERR! path C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json.1327804712 3npm ERR! dest C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json 4npm ERR! errno -4048 5npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json.1327804712' -> 'C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json' 6npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json.1327804712' -> 'C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json'] { 7npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json.1327804712' -> 'C:\Users\ユーザー名\OneDrive\デスクトップ\フォルダ名\node_modules\gulp-consolidate\package.json'] { 8npm ERR! errno: -4048, 9npm ERR! code: 'EPERM', 10npm ERR! syscall: 'rename', 11npm ERR! path: 'C:\\Users\\ユーザー名\\OneDrive\\デスクトップ\\フォルダ名\\node_modules\\gulp-consolidate\\package.json.1327804712', 12npm ERR! dest: 'C:\\Users\\ユーザー名\\OneDrive\\デスクトップ\\フォルダ名\\node_modules\\gulp-consolidate\\package.json' 13npm ERR! }, 14npm ERR! errno: -4048, 15npm ERR! code: 'EPERM', 16npm ERR! syscall: 'rename', 17npm ERR! path: 'C:\\Users\\ユーザー名\\OneDrive\\デスクトップ\\フォルダ名\\node_modules\\gulp-consolidate\\package.json.1327804712', 18npm ERR! dest: 'C:\\Users\\ユーザー名\\OneDrive\\デスクトップ\\フォルダ名\\node_modules\\gulp-consolidate\\package.json', 19npm ERR! parent: 'フォルダ名' 20npm ERR! } 21npm ERR! 22npm ERR! The operation was rejected by your operating system. 23npm ERR! It's possible that the file was already in use (by a text editor or antivirus), 24npm ERR! or that you lack permissions to access it. 25npm ERR! 26npm ERR! If you believe this might be a permissions issue, please double-check the 27npm ERR! permissions of the file and its containing directories, or try running 28npm ERR! the command again as root/Administrator. 29 30npm ERR! A complete log of this run can be found in: 31npm ERR! C:\Users\ユーザー名\AppData\Roaming\npm-cache\_logs\2022-09-03T07_35_14_581Z-debug.log
一応、node_modulesは『npm install』を打ち込むことで生成されたのですが、package-lock.jsonは生成されていない状態になっています。
環境はWindows10を使っています。
上記のエラーは一体何のことを指していて、どのようなことをすれば解決できるでしょうか?ググってもあまり近いような情報が見当たらず、ご質問させていただきました。
素人的な質問の仕方になってしまい申し訳ございませんが、もしおわかりの方がいらっしゃいましたら、ご回答をお願いいたします。
こちらの質問が複数のユーザーから「調査したこと・試したことが記載されていない質問」という指摘を受けました。
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2022/09/08 18:11