#vue.js #npm #npm-install
Вопрос:
Я пытаюсь установить Vue в проект Laravel. composer require laravel/ui --dev
Тогда я сделал php artisan ui vue
это .
Тогда я сделал npm install
и npm run dev
. Когда я пытаюсь это npm run dev
сделать, я получаю ошибку:
Additional dependencies must be installed. This will only take a moment.
Running: npm install vue-loader@^15.9.7 --save-dev --legacy-peer-deps
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
Finished. Please run Mix again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersognjeAppDataRoamingnpm-cache_logs2021-10-12T01_09_54_827Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Лог:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm@6.14.12
3 info using node@v14.16.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 info lifecycle @~dev: @
7 verbose lifecycle @~dev: unsafe-perm in lifecycle true
8 verbose lifecycle @~dev: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersognjeDesktopDiplomskiAplikacijanode_modules.bin;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:Python39Scripts;C:Python39;C:oraclexeapporacleproduct11.2.0serverbin;C:Program Files (x86)Common FilesOracleJavajavapath;C:Program Files (x86)Common FilesIntelShared Librariesredistintel64compiler;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;F:ProgramiSVNTortoisebin;C:Program Files (x86)Microsoft SQL Server150DTSBinn;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program Filesnodejs;C:ProgramDatachocolateybin;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIBMSPSSStatistics25JREbin;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:;C:wamp64binphpphp7.4.9;C:ProgramDataComposerSetupbin;C:UsersognjeAppDataLocalMicrosoftWindowsApps;C:UsersognjeAppDataLocalProgramsMicrosoft VS Codebin;F:ProgramiPHPStormPHPSTORMPhpStorm 2020.1.2bin;;C:UsersognjeAppDataLocalGitHubDesktopbin;C:Usersognje.dotnettools;C:Flex Windowsgccbin;C:Flex WindowsLexbin;C:Flex Windowsbisonbin;C:UsersognjeAppDataRoamingnpm;C:UsersognjeAppDataRoamingComposervendorbin
9 verbose lifecycle @~dev: CWD: C:UsersognjeDesktopDiplomskiAplikacija
10 silly lifecycle @~dev: Args: [ '/d /s /c', 'npm run development' ]
11 silly lifecycle @~dev: Returned: code: 1 signal: null
12 info lifecycle @~dev: Failed to exec dev script
13 verbose stack Error: @ dev: `npm run development`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid @
15 verbose cwd C:UsersognjeDesktopDiplomskiAplikacija
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
18 verbose node v14.16.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error @ dev: `npm run development`
22 error Exit status 1
23 error Failed at the @ dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
пакет.json:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"axios": "^0.21",
"bootstrap": "^4.6.0",
"jquery": "^3.6",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"popper.js": "^1.16.1",
"postcss": "^8.1.14",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.11",
"sass-loader": "^11.0.1",
"vue": "^2.6.12",
"vue-loader": "^15.9.7",
"vue-template-compiler": "^2.6.12"
}
}