我想尝试 Tailwind CSS,但在启动“npm run build”时遇到了问题。控制台返回:未找到尾风命令。但是我成功安装了它。
我升级 Node 和 npm。
此错误消息:
OnePage@1.0.0 build /Users/ted/Documents/Dweb/HTML : CSS/Projets/OnePage tailwind build src/css/tailwind.css -o dist/css/tailwind.css
sh: tailwind: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! OnePage@1.0.0 build: `tailwind build src/css/tailwind.css -o dist/css/tailwind.css`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the OnePage@1.0.0 build 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! /Users/ted/.npm/_logs/2019-06-15T18_11_03_382Z-debug.log
iMac-de-Ted:OnePage ted$ sudo npm run start
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ted/.npm/_logs/2019-06-15T18_13_18_897Z-debug.log
------------------------------------------------------------------
这是我的错误日志:
如果它以 ok 结尾,它会起作用的信息
1 详细的 cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ] 使用 npm@6.9.0 的信息
3 使用 node@v12.4.0 的信息
4个详细的运行脚本['prebuild','build','postbuild']
5 info 生命周期 OnePage@1.0.0~prebuild: OnePage@1.0.0
6 info 生命周期 OnePage@1.0.0~build: OnePage@1.0.0
7 冗长的生命周期 OnePage@1.0.0~build: unsafe-perm in lifecycle true
8 详细生命周期 OnePage@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/ted/Documents/Dweb/HTML : CSS/Projets /OnePage/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 详细生命周期 OnePage@1.0.0~build: CWD: /Users/ted/Documents/Dweb/HTML : CSS/Projets/OnePage
10 傻生命周期 OnePage@1.0.0~build: Args: [ 10 傻生命周期
'-c',10 愚蠢的生命周期 'tailwind build src/css/tailwind.css -o dist/css/tailwind.css' 10 愚蠢的生命周期]
11 info 生命周期 OnePage@1.0.0~build:无法执行构建脚本 12 详细堆栈错误:OnePage@1.0.0 构建:
tailwind build src/css/tailwind.css -o dist/css/tailwind.css
12 详细堆栈生成 ENOENT
ChildProcess 的 12 个详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
ChildProcess.emit (events.js:200:13) 的 12 个详细堆栈
MaybeClose 的 12 个详细堆栈 (internal/child_process.js:1021:16)
Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) 的 12 个详细堆栈
13 详细 pkgid OnePage@1.0.0
14 详细 cwd /Users/ted/Documents/Dweb/HTML : CSS/Projets/OnePage
15 详细的达尔文 18.6.0
16 详细 argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
17 详细节点 v12.4.0
18 详细的 npm v6.9.0
19 错误文件 sh
20 错误代码 ELIFECYCLE
21 错误 errno ENOENT
22 错误系统调用产生
23 错误 OnePage@1.0.0 构建:
tailwind build src/css/tailwind.css -o dist/css/tailwind.css
23 错误生成 ENOENT
24 错误 OnePage@1.0.0 构建脚本失败。
24 错误 这可能不是 npm 的问题。上面可能有额外的日志输出。25 详细退出 [ 1, true ]