打包的时候less报错
来源:5-3 服务端渲染的entry配置
_李
2018-07-12
./node_modules/css-loader!./node_modules/less-loader/dist/cjs.js!./node_modules/extract-text-webpack-plugin/dist/loader.js??ref--7-0!./node_modules/css-loader!./node_modules/less-loader/dist/cjs.js!./src/assets/css/index.less
Module build failed:
exports = module.exports = require("../../../node_modules/css-loader/lib/css-base.js")(false);
^
Unrecognised input
in /Users/mac/Desktop/1bgm_frontend/src/assets/css/index.less (line 1, column 8)
@ ./src/assets/css/index.less 2:14-290
@ ./src/create-app.js
@ ./src/server-entry.js
/Users/mac/Desktop/1bgm_frontend/node_modules/memory-fs/lib/MemoryFileSystem.js:114
throw new MemoryFileSystemError(errors.code.ENOENT, _path);
^
Error: no such file or directory
at MemoryFileSystem.readFileSync (/Users/mac/Desktop/1bgm_frontend/node_modules/memory-fs/lib/MemoryFileSystem.js:114:10)
at Watching.serverCompiler.watch [as handler] (/Users/mac/Desktop/1bgm_frontend/server/routers/dev-ssr.js:33:27)
at Watching._done (/Users/mac/Desktop/1bgm_frontend/node_modules/webpack/lib/Compiler.js:106:8)
at compiler.emitRecords.err (/Users/mac/Desktop/1bgm_frontend/node_modules/webpack/lib/Compiler.js:79:19)
at Compiler.emitRecords (/Users/mac/Desktop/1bgm_frontend/node_modules/webpack/lib/Compiler.js:371:38)
at compiler.emitAssets.err (/Users/mac/Desktop/1bgm_frontend/node_modules/webpack/lib/Compiler.js:62:20)
at applyPluginsAsyncSeries1.err (/Users/mac/Desktop/1bgm_frontend/node_modules/webpack/lib/Compiler.js:364:12)
at next (/Users/mac/Desktop/1bgm_frontend/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Users/mac/Desktop/1bgm_frontend/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Users/mac/Desktop/1bgm_frontend/node_modules/tapable/lib/Tapable.js:222:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 1bgm_frontend@1.0.0 build:server: `cross-env NODE_ENV=production node server/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 1bgm_frontend@1.0.0 build:server 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/mac/.npm/_logs/2018-07-12T10_00_12_614Z-debug.log
1回答
-
Jokcy
2018-07-13
index.less和引用index.less的代码贴出来看看
032018-07-16
相似问题