我以前在开发一个有角度的项目时没有遇到过这种情况。我在这个项目中使用了角2。下面是在我的项目dir中运行命令ng serve时出现的错误。
块{chartjs.module} chartjs.module.chunk.js,chartjs.module.chunk.js.map () 13.6 kB {main}呈现块{components.module} components.module.chunk.js,components.module.chunk.js.map () 268 kB {main}呈现块{dashboard.module} dashboard.module.chunk.js,dashboard.module.chunk.js.map () 64.5 kB {main}呈现块{icons.module} icons.module.chunk.js,icons.module.chunk.js.map () 184个kB {main}呈现块{内联} inline.bundle.js,inline.bundle.js.map (内联) 5.83 kB条目块{main} main.bundle.js,main.bundle.js.map (main) 82 kB {供应商}初始块{pages.module} pages.module.chunk.js,pages.module.chunk.js.map () 18.5 kB {main}呈现块{poly填充} polyfills.bundle.js,polyfills.bundle.js.map (多边形) 328 kB {内联}初始块{脚本} scripts.bundle.js,scripts.bundle.js.map (脚本) 358 kB {内联}初始块{样式} styles.bundle.js,styles.bundle.js.map (样式) 10.5 kB {内联}初始块{供应商} vendor.bundle.js,vendor.bundle.js.map (供应商)3.53MB初始块{widgets.module} widgets.module.chunk.js,widgets.module.chunk.js.map () 58.5 kB {main}呈现 在./node_sourceMap/css-加载程序中出错?{“sourceMap”:false,"includePaths":[]}!./src/scss/style.scss模块构建失败:sourceMap: ENOENT:没有这样的文件或目录,'/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/vendor‘at Object.fs.readdirSync (本机) at Object.fs.readdirSync (fs.js:952:18) at Object.getInstalledBinaries (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/extensions.js:124:13) at foundBinariesList (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/( (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/errors.js:15:5) at Object.module.exports.missingBinary (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/errors.js:45:5) at module.exports (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/binding )( .js:15:30) at Object。(/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/index.js:14:35) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)在Module.require (module.js:497:17)的require (内部/module.js:20:19)的对象。(/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/sass-loader/lib/loader.js:3:14) @ ./src/scss/style.scss 4:14-195 @multi.src/scss/style.scss webpack:没能编好。
我的节点v是8.4.0
如果有人能帮忙就好了。提前谢谢。
发布于 2017-09-13 02:43:13
我自己找到了解决这个问题的办法。下面的链接与我有相同的错误。https://github.com/JeffreyWay/laravel-mix/issues/226
只需运行npm安装节点sass即可。
如果存在运行npm安装节点sass的问题,则运行此命令。
npm安装节点-sass--无bin-link
它解决了我的问题。
发布于 2017-09-12 09:06:29
Try including the built version of chart.js:
"scripts": ["../node_modules/chart.js/dist/Chart.bundle.min.js"],
or you need to add the path to your .angular-cli.json like this:
"apps": [
"scripts": [
"../node_modules/chart.js/src/chart.js",
],
]https://stackoverflow.com/questions/46169927
复制相似问题