刚刚注意到那里有一个新版本的Semantic-UI,并立即想升级。现在,2.2.x的所有先前的次要升级都与npm update
一起工作正常,但跳到2.3停止工作,刷新所有以前的构建并强制从头开始重新启动(选择项目等)。我的项目根本不是npm项目,只是有MVC逻辑,想要编译我自己的css包以在我的视图中使用。我重新使用包中的分布式js。有什么建议我如何在semantic-ui
项目中使用node_modules
文件夹中的所有默认分发?
这里是我通常得到的痕迹:
Installing
------------------------------
Installing to node_modules/semantic-ui
Copying UI definitions
[20:07:55] 'create install files' errored after 8 ms
[20:07:55] Error: ENOENT: no such file or directory, stat './src/definitions'
at Object.fs.statSync (fs.js:968:11)
at Object.exports.copyDirSyncRecursive (/path/to/project/node_modules/wrench-sui/lib/wrench.js:244:23)
at Gulp.<anonymous> (/path/to/project/node_modules/semantic-ui/tasks/install.js:302:12)
at module.exports (/path/to/project/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/path/to/project/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/path/to/project/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/path/to/project/node_modules/orchestrator/index.js:134:8)
at runNextSet (/path/to/project/node_modules/run-sequence/index.js:106:15)
at Gulp.onTaskEnd (/path/to/project/node_modules/run-sequence/index.js:95:4)
at Gulp.emit (events.js:165:20)
[20:07:55] 'install' errored after 14 s
[20:07:55] Error in plugin 'run-sequence(create install files)'
Message:
ENOENT: no such file or directory, stat './src/definitions'
Details:
errno: -2
code: ENOENT
syscall: stat
path: ./src/definitions
答案 0 :(得分:0)
当我完成我的问题草稿并开始审核时,立即想到了一个测试用例:为什么不尝试完整路径。那很有效。不希望这种经历浪费掉,分享我的挣扎和浪费时间。
Installing
------------------------------
Installing to /path/to/project/node_modules/semantic-ui
Copying UI definitions
Copying UI themes
Copying gulp tasks
Adding theme files
Creating gulpfile.js
Creating site theme folder /path/to/project/path/to/project/node_modules/semantic-ui/src/site/
[20:22:36] Starting 'create theme.config'...
Adjusting @siteFolder to: site/
Creating src/theme.config (LESS config) /path/to/project/path/to/project/node_modules/semantic-ui/src/theme.config
[20:22:36] Finished 'create theme.config' after 13 ms
[20:22:36] Starting 'create semantic.json'...
Creating config file (semantic.json) /path/to/project/semantic.json
[20:22:36] Finished 'create semantic.json' after 10 ms
[20:22:36] Finished 'create install files' after 103 ms
[20:22:36] Starting 'clean up install'...
Setup Complete!
Installing Peer Dependencies. Please refrain from ctrl + c...
After completion navigate to /path/to/project/node_modules/semantic-ui and run "gulp build" to build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ semantic-ui@2.3.0
added 22 packages in 55.506s
注意!脚本会自动在path/to/project
中为您安装网页,这看起来像是双重复制,但事实并非如此。不得不从源中删除它并检查theme.config
中的任何更改。其他脚本已经存在并且很好用。