Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

依赖 arale-autocomplete 时 build 报错 #1269

Closed
sorrycc opened this issue Apr 20, 2015 · 1 comment
Closed

依赖 arale-autocomplete 时 build 报错 #1269

sorrycc opened this issue Apr 20, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@sorrycc
Copy link
Member

sorrycc commented Apr 20, 2015

$ spm b --debug

          start: build arale-autocomplete@1.4.0
         target: http://spmjs.io
        install: jquery@1.7.2
        install: arale-templatable@0.10.0
        install: arale-base@1.2.0
        install: arale-overlay@1.2.0
        install: handlebars-runtime@1.3.0
        extract: ~/.spm/cache/jquery-1.7.2.tar.gz
        extract: ~/.spm/cache/arale-base-1.2.0.tar.gz
        extract: ~/.spm/cache/arale-templatable-0.10.0.tar.gz
        extract: ~/.spm/cache/arale-overlay-1.2.0.tar.gz
      installed: $CWD/spm_modules/jquery/1.7.2
      installed: $CWD/spm_modules/arale-base/1.2.0
        depends: arale-class@1.2.0, arale-events@1.2.0
        install: arale-class@1.2.0
        install: arale-events@1.2.0
      installed: $CWD/spm_modules/arale-templatable/0.10.0
        depends: jquery@1.7.2, handlebars@1.3.0
        install: jquery@1.7.2
          found: jquery@1.7.2
        install: handlebars@1.3.0
        extract: ~/.spm/cache/handlebars-runtime-1.3.0.tar.gz
      installed: $CWD/spm_modules/arale-overlay/1.2.0
        depends: jquery@1.7.2, arale-widget@1.2.0, position@1.1.0, arale-iframe-shim@1.1.0
        install: jquery@1.7.2
          found: jquery@1.7.2
        install: arale-widget@1.2.0
        install: position@1.1.0
        install: arale-iframe-shim@1.1.0
      installed: $CWD/spm_modules/handlebars-runtime/1.3.0
        extract: ~/.spm/cache/arale-class-1.2.0.tar.gz
      installed: $CWD/spm_modules/arale-class/1.2.0
        extract: ~/.spm/cache/arale-events-1.2.0.tar.gz
      installed: $CWD/spm_modules/arale-events/1.2.0
        extract: ~/.spm/cache/handlebars-1.3.0.tar.gz
        extract: ~/.spm/cache/arale-widget-1.2.0.tar.gz
      installed: $CWD/spm_modules/handlebars/1.3.0
      installed: $CWD/spm_modules/arale-widget/1.2.0
        depends: jquery@1.7.2, arale-base@1.2.0
        install: jquery@1.7.2
          found: jquery@1.7.2
        install: arale-base@1.2.0
          found: arale-base@1.2.0
        extract: ~/.spm/cache/position-1.1.0.tar.gz
      installed: $CWD/spm_modules/position/1.1.0
        depends: jquery@1.7.2
        install: jquery@1.7.2
          found: jquery@1.7.2
        extract: ~/.spm/cache/arale-iframe-shim-1.1.0.tar.gz
      installed: $CWD/spm_modules/arale-iframe-shim/1.1.0
        depends: jquery@1.7.2, position@1.1.0
        install: jquery@1.7.2
          found: jquery@1.7.2
        install: position@1.1.0
          found: position@1.1.0
          build: compile
          error: Module build failed: Error: Partial 'html' not found
    at tryExtension (~/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/handlebars-loader/index.js:198:29)
    at /Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/handlebars-loader/index.js:208:6
    at /Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/handlebars-loader/index.js:167:14
    at /Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:24:19
    at onResolved (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:38:18)
    at /Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:127:10
    at /Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:191:15
    at applyPluginsParallelBailResult.createInnerCallback.log (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:110:4)
    at loggingCallbackWrapper (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/createInnerCallback.js:21:19)
    at /Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/tapable/lib/Tapable.js:134:6
    at Tapable.<anonymous> (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/DirectoryDescriptionFilePlugin.js:24:12)
    at Storage.finished (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at evalmachine.<anonymous>:224:20
    at OpenReq.Req.done (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:141:5)
    at OpenReq.done (/Users/chencheng/Documents/Work/Libraries/alipay/spm-family/spm/node_modules/spm-webpack/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:61:22)
    at Object.oncomplete (evalmachine.<anonymous>:93:15)
@sorrycc sorrycc added the bug label Apr 20, 2015
@sorrycc sorrycc added this to the 3.6.x milestone Apr 20, 2015
@sorrycc sorrycc self-assigned this May 5, 2015
@sorrycc
Copy link
Member Author

sorrycc commented May 5, 2015

原因是 webpack 的 handlebars-loader 做的事情和 arale-templatable 的需求不一致引起的。我写了一个单独的 spmhandlebars-loader@0.1.0 来解决这个问题。

项目中如果用了 arale-autocomplete,可以这样解决:

  1. npm i handlebars@1.3.0 spmhandlebars-loader -S
  2. 修改 package.json ,spm.build 下增加配置覆盖 handlebars 的解析 "loader": {"handlebars":"spmhandlebars-loader"}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant