A Vue.js project
# install dependencies
yarn
# serve with hot reload at localhost:8080
npm run dev
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
关于vue项目多页面的配置demo
A Vue.js project
# install dependencies
yarn
# serve with hot reload at localhost:8080
npm run dev
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
首先,我尚未修改任何该项目的配置(才刚拿来,想写个demo看看),只是多安装了个 precss 插件。
postcss 的 precss 插件也尚未自定义任何参数,如果只是使用该插件提供的变量写法或 @extend 时正常,但使用 &(css 嵌套的语法符) 时就报错了,其他语法尚未验证,报错内容:
Node#after is deprecated. Use Node#raws.after
Your current PostCSS version is 5.2.18, but postcss-nesting uses 6.0.14. Perhaps this is the source of the error below.
TypeError: node.parent.after is not a function
at module.exports (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss-nesting\lib\transform-nesting-rule.js:18:29)
at module.exports (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss-nesting\lib\transform.js:16:3)
at E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\container.js:148:26
at Rule.each (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\container.js:114:22)
at Rule.walk (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\container.js:147:21)
at E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\container.js:150:32
at Root.each (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\container.js:114:22)
at Root.walk (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\container.js:147:21)
at E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss-nesting\index.js:9:24
at LazyResult.run (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:274:20)
at LazyResult.asyncTick (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:189:32)
at LazyResult.asyncTick (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:201:22)
at LazyResult.asyncTick (E:\jinnchen\Documents\EGDownloads\vue-pages-master\node_modules\_[email protected]@postcss\lib\lazy-result.js:201:22)
ERROR Failed to compile with 1 errors08:13:38
根据报错内容我也特意安装了指定版本的 postcss,但还是报错了,不知道是为何,希望解答,多谢。
Starting dev server...
ERROR Failed to compile with 2 errors 13:50:53
error in ./src/pages/index/index_main.js
Module build failed: Error: Cannot find module 'babel-runtime/core-js/get-iterator'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\work\Desktop\code\src\vue-pages\node_modules_babel-core@6.26.0@babel-core\lib\transformation\file\index.js:6:21)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\work\Desktop\code\src\vue-pages\node_modules_babel-core@6.26.0@babel-core\lib\api\node.js:6:13)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
@ multi ./build/dev-client ./src/pages/index/index_main.js
error in ./src/pages/login/login_main.js
Module build failed: Error: Cannot find module 'babel-runtime/core-js/get-iterator'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\work\Desktop\code\src\vue-pages\node_modules_babel-core@6.26.0@babel-core\lib\transformation\file\index.js:6:21)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\work\Desktop\code\src\vue-pages\node_modules_babel-core@6.26.0@babel-core\lib\api\node.js:6:13)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
@ multi ./build/dev-client ./src/pages/login/login_main.js
运行报错
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.