github1586 / nuxt-bnhcp Goto Github PK
View Code? Open in Web Editor NEWnuxt、node/express、vue、mysql、redis、socket.io (全栈-实战商城)~
Home Page: http://nodet.cn
nuxt、node/express、vue、mysql、redis、socket.io (全栈-实战商城)~
Home Page: http://nodet.cn
哥们,你这应用,sql文件不放出来,连你的远程API又没允许跨域,根本跑步起来额
server文件夹下的api.js缺失啊,还有sql文件在哪啊老哥???
请教下你这个项目的适配是如何处理的
sh-3.2# npm run dev
> [email protected] dev /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp
> backpack dev
Usage: backpack <path> <listen host> <listen port> <redis host> <redis port>
sh-3.2#
error Unsupported URL Type "npm:": npm:nuxt-edge
D:\2git-work\node-server-work\nuxt-bnhcp\node_modules\mini-css-extract-plugin\dist\index.js:20
util: { createHash }
^
TypeError: Cannot destructure property createHash
of 'undefined' or 'null'.
我用npm run generate打包的静态文件
index.html里面的标签都没闭合。。。。
其他页打包面正常。。。
还有怎么在nuxt项目 设置webpack打包配置?
$ npm run dev
[email protected] dev E:\qtx\nuxt-bnhcp\local\template
backpack dev
DONE Compiled successfully in 938ms10:23:08
(node:1984) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: __WEBPACK_IMPORTED_MODULE_1_nuxt___default.a is not a constructor
node v6.11.2
请帮忙看看咋回事
code: 'ER_NO_SUCH_TABLE',
errno: 1146,
sqlMessage: "Table 'bnhcp.teacher' doesn't exist",
sqlState: '42S02',
index: 0,
sql: 'SELECT i.institutionsName,e.gradeId,w.gradeTwoId,t.teacherName,t.evalPerson, p.campusesName, c.*,\n' +
" date_format(open_date,'%Y-%m-%d') open_date1, \n" +
" date_format(end_date,'%Y-%m-%d') end_date1 \n" +
' from course c \n' +
' left join teacher t on c.teacher_id = t.thacherId\n' +
' left join campuses p on t.schoolId = p.campusesId\n' +
' left join institutions i on p.campusesParentId = i.institutionsId\n' +
' left join gradeThree h on c.course_id = h.gradeThreeId\n' +
' left join gradeTwo w on h.pid = w.gradeTwoId\n' +
' left join gradeOne e on w.pid = e.gradeId\n' +
' where e.gradeId=15963594 \n' +
' ORDER BY RAND()\n' +
' limit 0,15'
}
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] restarting due to changes...
[nodemon] starting babel-node server/index.js
数据库不全 能否传个全的 貌似缺少了 teacher 的表
进入详情页刷新的时候,页面丢失了,你是怎么定向到服务错误Server error的
ERROR Failed to compile with 1 errors15:38:52
This relative module was not found:
Error: Cannot find module 'F:\nodes\nuxt-bnhcp\build\main.js'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3
找不到api文件
首先感谢大大开源的代码,启发良多。
现在我是在做一个vue2.x项目升级,需要进行首屏优化,之前是ajax json形式的接口,
利用nuxt 这一套的话,服务端部分该如何进行改造比较合适,即:asyncData部分调之前的接口而不是express的
你这个seo 怎么样,听说vue的 seo 很麻烦?
我试了一下,项目出错了,跑不起来...
如题,楼主可以给我一些假数据吗,然后测试地址已经不能访问了
大佬,sql可以给下吗
官网的介绍好像是把源码拉到服务器,然后使用nuxt build & nuxt strart .
有没有可以像后端war包一样,打成一个资源包然后丢到服务器即可
code: 'ER_NO_SUCH_TABLE',
errno: 1146,
sqlMessage: "Table 'bnhcp.teacher' doesn't exist",
sqlState: '42S02',
index: 0,
sql: 'SELECT i.institutionsName,e.gradeId,w.gradeTwoId,t.teacherName,t.evalPerson, p.campusesName, c.*,\n' +
" date_format(open_date,'%Y-%m-%d') open_date1, \n" +
" date_format(end_date,'%Y-%m-%d') end_date1 \n" +
' from course c \n' +
' left join teacher t on c.teacher_id = t.thacherId\n' +
' left join campuses p on t.schoolId = p.campusesId\n' +
' left join institutions i on p.campusesParentId = i.institutionsId\n' +
' left join gradeThree h on c.course_id = h.gradeThreeId\n' +
' left join gradeTwo w on h.pid = w.gradeTwoId\n' +
' left join gradeOne e on w.pid = e.gradeId\n' +
' where e.gradeId=15963594 \n' +
' ORDER BY RAND()\n' +
' limit 0,15'
}
$ npm run dev
> [email protected] dev D:\project\test\vue-bnhcp-master
> backpack dev
ERROR Failed to compile with 1 errors16:34:56
This relative module was not found:
* ./api in ./server/index.js
module.js:471
throw err;
^
Error: Cannot find module 'D:\project\test\vue-bnhcp-master\build\main.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3
找不到这个 build/main.js ,可项目中都没这个文件夹啊?
如题。
`DJdeMacBook-Pro:nuxt-bnhcp dj$ npm run dev
[email protected] dev /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp
backpack dev
(node:4739) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see webpack/loader-utils#56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
DJdeMacBook-Pro:nuxt-bnhcp dj$ `
后台可以开源吗?
`DJdeMacBook-Pro:nuxt-bnhcp dj$ npm run dev
[email protected] dev /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp
backpack dev
(node:4114) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see webpack/loader-utils#56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
ERROR Failed to compile with 1 errors 22:14:20
This relative module was not found:
Error: Cannot find module '/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/build/main.js'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3
^CDJdeMacBook-Pro:nuxt-bnhcp dj$ npm run build
[email protected] build /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp
nuxt build
[nuxt] Building...
nuxt:build App root: /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp +0ms
nuxt:build Generating /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/.nuxt files... +0ms
nuxt:build Generating files... +4ms
nuxt:build Generating routes... +3ms
nuxt:build Building files... +22ms
Build completed in 5.094s
[nuxt:build:client]
Hash: 07c1a51514e61299c902
Version: webpack 2.7.0
Time: 5099ms
Asset Size Chunks Chunk Names
vendor.bundle.d585a68383e74ba803c7.js 202 kB 0 [emitted] vendor
nuxt.bundle.c2ebf0d06e1049ba5410.js 1.83 kB 1 [emitted] app
manifest.07c1a51514e61299c902.js 1.46 kB 2 [emitted] manifest
index.html 132 bytes [emitted]
client-manifest.json 12.2 kB [emitted]
ERROR in ./.nuxt/client.js
Module build failed: Error: Couldn't find preset "vue-app" relative to directory "/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/.nuxt"
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
at Array.map ()
at OptionManager.resolvePresets (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-loader/lib/index.js:50:20)
at Object.module.exports (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/babel-loader/lib/index.js:175:20)
Error: Webpack build exited with errors
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/dist/nuxt.js:1170:46
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/Compiler.js:272:15
at Compiler.emitRecords (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/Compiler.js:367:37)
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/Compiler.js:265:12
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/Compiler.js:360:11
at next (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/Compiler.js:357:8)
at Compiler. (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/webpack/lib/Compiler.js:352:14)
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/async/dist/async.js:421:16
at iteratorCallback (/Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/async/dist/async.js:998:13)
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/async/dist/async.js:906:16
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/eslint/node_modules/graceful-fs/graceful-fs.js:43:10
at /Users/dj/WorkSpace/GitSpace/09_26/nuxt-bnhcp/node_modules/nuxt/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: nuxt build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/dj/.npm/_logs/2017-09-26T14_14_40_765Z-debug.log
DJdeMacBook-Pro:nuxt-bnhcp dj$
DJdeMacBook-Pro:nuxt-bnhcp dj$
`
Table 'bnhcp.course' doesn't exist
Table 'bnhcp.user' doesn't exist
您好,我遇到一个问题,在当前项目中点击链接跳转走,当点击浏览器回退按钮回到当前项目的时候,发现页面并没有刷新,您有解决方案吗?
SELECT i.institutionsName,e.gradeId,w.gradeTwoId,t.teacherName,t.evalPerson, p.campusesName, c.*,
date_format(open_date,'%Y-%m-%d') open_date1,
date_format(end_date,'%Y-%m-%d') end_date1
from course c
left join teacher t on c.teacher_id = t.thacherId
left join campuses p on t.schoolId = p.campusesId
left join institutions i on p.campusesParentId = i.institutionsId
left join gradeThree h on c.course_id = h.gradeThreeId
left join gradeTwo w on h.pid = w.gradeTwoId
left join gradeOne e on w.pid = e.gradeId
where e.gradeId=15963591
ORDER BY RAND()
limit 0,15
=> Table 'bnhcp.course' doesn't exist
This relative module was not found:
Error: Cannot find module 'vue-bnhcp/build/main.js'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.