プログラミング初心者です
Webアプリケーションを作成するために、Laravel5でBootstrap4を使おうと思い方法を調べていたら、Bootstrap4からはpopper.jsが必要だということが分かりました。Laravel5でpopper.jsを使うにはpakcage.jsonを使う必要があるそうなので、PCにnpmをインストールしpackage.jsonを作成しようとしたのですが、ここで問題発生です。
package.jsonを作成するために npm init で質問に答えて必要な項目を打ち込んだのですがエラーが沢山出てきてpackage.jsonを作成できません。
この問題を解決できる方がおりましたらおどうか願いします。
発生している問題・エラーメッセージ
エラーメッセージ
npm ERR! path c:\package.json npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall open npm ERR! Error: EPERM: operation not permitted, open 'c:\package.json' npm ERR! { [Error: EPERM: operation not permitted, open 'c:\package.json'] npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, open \'c:\package.json\'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'open', npm ERR! path: 'c:\package.json' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator (though this is not recommended). npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\syiugisty\AppData\Roaming\npm-cache\_logs\2018-09-23T19_52_29_755Z-debug.log
該当のソースコード(npm init 以降の文)
c:\>npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults. See `npm help json` for definitive documentation on these fields and exactly what they do. Use `npm install <pkg>` afterwards to install a package and save it as a dependency in the package.json file. Press ^C at any time to quit. package name: hoge version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to c:\package.json: { "name": "hoge", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" } Is this OK? (yes)
試したこと
・コマンドプロンプトの再起動
・PCの再起動
・npm再インストール
・npm cach clean でキャッシュクリアを試みるもエラー
c:\>npm cache clean npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one. npm ERR! npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\syiugisty\AppData\Roaming\npm-cache\_logs\2018-09-23T20_46_20_308Z-debug.log
補足情報(FW/ツールのバージョンなど)
・使用PC Windows10
・npm バージョン6.4.1
・npmをインストールするために同時にインストールしたNode.jsのバージョン10.11.0
・Laravel バージョン5.7.3
・Bootstrap バージョン4.1.3 使用予定
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/09/24 02:50