首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >npm装置在新鲜拉拉8 app上的应用

npm装置在新鲜拉拉8 app上的应用
EN

Stack Overflow用户
提问于 2022-04-04 11:48:47
回答 1查看 407关注 0票数 0

我用的是拉里。创造了一个新鲜的拉拉8应用程序。安装了Jetstream和livewire。然后尝试运行npm安装&& npm运行开发。但会犯错误。

我尝试过删除node_module的文件夹和package-lock.json重新安装包使用npm install

清除npm缓存后,尝试再次运行npm run dev,但没有帮助。

我的package.json

代码语言:javascript
运行
复制
{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch:all": "parallelshell \"npm run watch:scss\" \"npm run lite\""
    },
    "devDependencies": {
        "@tailwindcss/forms": "^0.4.0",
        "@tailwindcss/typography": "^0.5.0",
        "alpinejs": "^3.0.6",
        "axios": "^0.19",
        "cross-env": "^7.0",
        "laravel-mix": "^6.0.43",
        "lodash": "^4.17.19",
        "postcss-import": "^14.0.1",
        "resolve-url-loader": "^3.1.0",
        "tailwindcss": "^3.0.0",
        "vue-template-compiler": "^2.6.14"
    }
}

我的日志文件:

代码语言:javascript
运行
复制
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\laragon\\bin\\nodejs\\node-v14\\node.exe',
1 verbose cli   'C:\\laragon\\bin\\nodejs\\node-v14\\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:\laragon\bin\nodejs\node-v14\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\laragon\www\school\node_modules\.bin;C:\Users\This pc\AppData\Local\Yarn\config\global\node_modules\.bin;C:\Users\This pc\AppData\Roaming\npm;C:\Users\This pc\AppData\Roaming\Composer\vendor\bin;;C:\laragon\bin\laragon\utils;C:\laragon\bin\mysql\mysql-5.7.33-winx64\bin;C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64;C:\laragon\bin\composer;C:\laragon\bin\apache\httpd-2.4.47-win64-VS16\bin;C:\laragon\bin\redis\redis-x64-3.2.100;C:\laragon\bin\nodejs\node-v14;C:\laragon\bin\nginx\nginx-1.19.10;C:\laragon\bin\notepad++;C:\laragon\bin\telnet;C:\laragon\bin\ngrok;C:\laragon\bin\git\bin;C:\laragon\bin\git\cmd;C:\laragon\bin\git\usr\bin;C:\laragon\bin\git\mingw64\bin;C:\laragon\bin;C:\laragon\usr\bin;C:\laragon\bin\cmder\bin;C:\Python310\Scripts\;C:\Python310\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Users\This pc\AppData\Local\Microsoft\WindowsApps;C:\Users\This pc\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\This pc\AppData\Local\GitHubDesktop\bin;C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64;C:\laragon\bin\php\php-8.1.3-nts-Win32-vs16-x64;C:\Users\This pc\AppData\Roaming\npm;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\share\vim\vim74;C:\laragon\bin\cmder\;
9 verbose lifecycle @~dev: CWD: C:\laragon\www\school
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:\laragon\bin\nodejs\node-v14\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\laragon\bin\nodejs\node-v14\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.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:\laragon\www\school
16 verbose Windows_NT 10.0.19044
17 verbose argv "C:\\laragon\\bin\\nodejs\\node-v14\\node.exe" "C:\\laragon\\bin\\nodejs\\node-v14\\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 ]
EN

回答 1

Stack Overflow用户

发布于 2022-04-04 13:59:23

使用新的混合CLI。内部脚本使用..。

代码语言:javascript
运行
复制
"scripts": {
    "development": "mix",
    "watch": "mix watch",
    "watch-poll": "mix watch -- --watch-options-poll=1000",
    "hot": "mix watch --hot",
    "production": "mix --production"
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71736755

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档