tustman / smart-home

参照米家APP布局和样式,编写的一款智能家居小程序
https://github.com/tustman/smart-home
52 stars 21 forks source link

求助!npm run dev报错 #1

Open leitao0819 opened 5 years ago

leitao0819 commented 5 years ago

filename: utils.assetsPath([name].${config.dev.fileExt.style}) ^

TypeError: Cannot read property 'style' of undefined at Object. (C:\Users\Yunhu Timlei\Downloads\smart-home-master\build\webpack.dev.conf.js:47:63) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (C:\Users\XX\Downloads\smart-home-master\build\dev-server.js:15:21) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Function.Module.runMain (internal/modules/cjs/loader.js:754:12) at startup (internal/bootstrap/node.js:283:19) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! smart-home@1.0.0 dev: node build/dev-server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the smart-home@1.0.0 dev 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! G:\nodejs\node_cache_logs\2019-04-24T12_50_39_809Z-debug.log

tustman commented 5 years ago

你好,文档写的不准确,因为是小程序开发,不需要执行npm run dev命令的,npm install后,配置上自己的appId,用微信开发工具导入项目就可以了。可以先试试,如果有问题及时反馈。

H-panpan commented 5 years ago

这个要执行npm run dev 吧 不执行怎么生成dist 文件,我用npm run dev 后出现了Module build failed: TypeError: Cannot read property 'platform' of undefine这个错误,不知道怎么回事