2016-09-29 69 views
1

我試圖做模板初始化時出現此錯誤。 可能未處理的拒絕[6] TypeError:在文件中加載「js/bundle」時出錯:/Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js 評估文件時出錯:/ Users/MyUser/Documents /CentricSites/BigCommerce/Capacity/assets/js/bundle.js 無法在i處讀取未定義的 的屬性'createElement'(文件:/Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js: 1:17836) at file:/Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js:2:2295 at file:/ Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets /js/bundle.js:2:2989 at t(file:/Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js:1:3612) at file:/ Users/MyUser /文件/ CentricSites/BIGC ommerce/Capacity/assets/js/bundle.js:1:3617 at file:/Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js:3:24280 at file:/ Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js:1:3260 at file:/Users/MyUser/Documents/CentricSites/BigCommerce/Capacity/assets/js/bundle.js:1:3343 在doEval的Object.exports.runInThisContext(vm.js:54:17) (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs/dist/system.src.js:2400:10 ) at __eval(/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs/dist/system.src.js:2317:7) at Loader.exec [as __exec](/ usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs/dist/system.src.js:339:5) at Load er.loader.instantiate(/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs/dist/system.src.js:802:14) Loader.loader.instantiate(/ usr/local /lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs/dist/system.src.js:1135:30) at Loader.loader.instantiate(/ usr/local/lib/node_modules/@ bigcommerce/stencil-在Loader.loader.instantiate(/ usr/local/lib/node_modules/@ bigcommerce/stencil-cli/node_modules/systemjs/dist/system。)中的cli/node_modules/systemjs/dist/system.src.js:1234:30) 。在Loader.loader.instantiate(/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs/dist/system.src.js:1842:32)處的src.js:1534:30) Loader.loader.instantiate(/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/systemjs-builder/compilers/amd.js:354:36) 位於/ usr /local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/es6-module-loader/dist/es6-module-loader.src.js:1545:33 at tryCatchReject(/ usr/local/lib/node_modules/@ bigcommerce/stencil-cli/node_modules/es6-module-loader/dist/es6-module-loader.src.js:1183:30) runContinuation1(/ usr/local/lib/node_modules/@ bigcommerce/stencil-cli /node_modules/es6-module-loader/dist/es6-module-loader.src.js:1142:4) at Fulfilled.when(/ usr/local/lib/node_modules/@ bigcommerce/stencil-cli/node_modules/es6 -module-loader/dist/es6-module-loader.src.js:930:4) at Pending.run(/ usr/local/lib/node_modules/@ bigcommerce/stencil-cli/node_modules/es6-module-loader /dist/es6-module-loader.src.js:821:13) at Scheduler._drain(/ usr/local/lib/node_modules/@ bigcommerce/stencil-cli/node_modules/es6-module-loader/dist/es6 -module-loader.src.js:97:19) at Scheduler.drain(/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/es6-module-loader/dist/es6-module-loader.src.js:62:9) at nextTickCallbackWith0Args( node.js:452:9) at process._tickCallback(node.js:381:13)BigCommerce模板INIT錯誤

我甚至不確定我在找什麼。

+0

任何運氣stencil start &看到的前端?我有同樣的問題 – Omar

+0

還沒有。我一直希望BigCommerce會有人回答。 – Tigerlady

+0

你有前端控制檯錯誤嗎?你在使用模板嗎? '404錯誤:http:// localhost:3000/stencil/theme/3/js/dependency-bundle.js' – Omar

回答

0

我一直在遇到同樣的問題。最後爲我工作的是下載一個新的主題zip文件,運行npm install,jspm install,然後刪除assets/js/bundle。js文件運行前stencil init

0
  1. 取出node_modules和JSPM包然後重新安裝以正確的順序(從根目錄)rm -rf node_modules/ && rm -rf assets/jspm_packages/ && npm install && jspm install

  2. 運行stencil init並完成嚮導與您的信息...你仍然會得到錯誤(步3將修復它)

  3. 現在刪除bundle.js,然後再模板初始化rm assets/js/bundle.js && stencil init

完成模板初始化後,您不應該在這次看到任何錯誤。 Procceed像往常一樣 - 在http://localhost:3000/