kritzcreek / squirrelzon

A Webshop with a twist
MIT License
6 stars 3 forks source link

Problem running the scaffold #2

Open sebfisch opened 9 years ago

sebfisch commented 9 years ago

I checked out the master branch at 7d0ac8fbe11c6a047a02ab47c7bdf9c2673ab71b and cannot successfully start the server using gulp after running npm install and bower install. I get the following error message:

ERROR in ./~/babel-loader!./output/Squirrelzon.Ui.Render/index.js
Module not found: Error: Cannot resolve module 'Webshop' in /home/sebf/Code/PureScript/squirrelzon/output/Squirrelzon.Ui.Render
 @ ./~/babel-loader!./output/Squirrelzon.Ui.Render/index.js 15:30-54

It points at line 15 of squirrelzon/src/purs/Squirrelzon/Ui/Render.purs complaining that the component exported from squirrelzon/src/js/components/Webshop.js cannot be resolved.

I am new to Javascript development with gulp, webpack, and babel so I'm not sure how to continue and appreciate any pointers!

P.S. Here is a full transcript of what I did:

$ git clone https://github.com/kRITZCREEK/squirrelzon
Cloning into 'squirrelzon'...
remote: Counting objects: 77, done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 77 (delta 11), reused 77 (delta 11), pack-reused 0
Unpacking objects: 100% (77/77), done.
Checking connectivity... done.
$ cd squirrelzon/
squirrelzon $ npm install
npm WARN package.json squirrelzon@1.0.0 No repository field.
npm WARN optional dep failed, continuing fsevents@0.3.5

> ws@0.5.0 install /home/sebf/Code/PureScript/squirrelzon/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/sebf/Code/PureScript/squirrelzon/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/home/sebf/Code/PureScript/squirrelzon/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
npm WARN optional dep failed, continuing fsevents@0.3.5

> ws@0.4.31 install /home/sebf/Code/PureScript/squirrelzon/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/sebf/Code/PureScript/squirrelzon/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/sebf/Code/PureScript/squirrelzon/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
\
> purescript@0.6.10 postinstall /home/sebf/Code/PureScript/squirrelzon/node_modules/purescript
> node lib/install.js

  ✔ psc pre-build test passed successfully
  ✔ psc-docs pre-build test passed successfully
  ✔ psc-make pre-build test passed successfully
  ✔ psci pre-build test passed successfully
del@1.1.1 node_modules/del
├── is-path-cwd@1.0.0
├── object-assign@2.0.0
├── each-async@1.1.1 (set-immediate-shim@1.0.1, onetime@1.0.0)
├── is-path-in-cwd@1.0.0 (is-path-inside@1.0.0)
├── globby@1.2.0 (array-union@1.0.1, async@0.9.0, glob@4.5.3)
└── rimraf@2.3.2 (glob@4.5.3)

gulp-webpack@1.4.0 node_modules/gulp-webpack
├── through@2.3.7
├── memory-fs@0.2.0
├── vinyl@0.4.6 (clone-stats@0.0.1, clone@0.2.0)
└── gulp-util@3.0.4 (array-differ@1.0.0, beeper@1.0.0, object-assign@2.0.0, array-uniq@1.0.2, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, lodash._reevaluate@3.0.0, replace-ext@0.0.1, minimist@1.1.1, chalk@1.0.0, lodash.template@3.5.0, through2@0.6.5, dateformat@1.0.11, multipipe@0.1.2)

alt@0.15.6 node_modules/alt
├── object-assign@2.0.0
├── es-symbol@1.1.1
├── flux@2.0.1
└── eventemitter3@0.1.6

gulp-purescript@0.3.1 node_modules/gulp-purescript
├── which@1.0.9
├── minimist@1.1.1
├── resolve-bin@0.3.0 (find-parent-dir@0.1.0)
├── logalot@2.1.0 (figures@1.3.5, squeak@1.2.0)
├── through2@0.6.5 (xtend@4.0.0, readable-stream@1.0.33)
├── gulp-util@3.0.4 (array-differ@1.0.0, object-assign@2.0.0, beeper@1.0.0, array-uniq@1.0.2, lodash._reevaluate@3.0.0, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, replace-ext@0.0.1, vinyl@0.4.6, chalk@1.0.0, lodash.template@3.5.0, dateformat@1.0.11)
├── multipipe@0.1.2 (duplexer2@0.0.2)
└── lodash@3.7.0

html-webpack-plugin@1.3.0 node_modules/html-webpack-plugin
├── blueimp-tmpl@2.5.4
└── lodash@3.6.0

purs-loader@0.0.3 node_modules/purs-loader
├── chalk@0.5.1 (escape-string-regexp@1.0.3, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── glob@4.0.6 (inherits@2.0.1, graceful-fs@3.0.6, once@1.3.1, minimatch@1.0.0)
├── lodash@2.4.1
└── loader-utils@0.2.7 (json5@0.1.0, big.js@2.5.1)

babel-loader@4.3.0 node_modules/babel-loader
└── loader-utils@0.2.7 (json5@0.1.0, big.js@2.5.1)

react@0.13.2 node_modules/react
└── envify@3.4.0 (through@2.3.7, jstransform@10.1.0)

webpack@1.8.9 node_modules/webpack
├── supports-color@1.3.1
├── interpret@0.5.2
├── tapable@0.1.9
├── clone@0.1.19
├── memory-fs@0.2.0
├── async@0.9.0
├── mkdirp@0.5.0 (minimist@0.0.8)
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── enhanced-resolve@0.8.5 (graceful-fs@3.0.6)
├── watchpack@0.2.4 (graceful-fs@3.0.6, chokidar@1.0.1)
├── webpack-core@0.6.5 (source-list-map@0.1.5, source-map@0.4.2)
├── uglify-js@2.4.20 (uglify-to-browserify@1.0.2, async@0.2.10, yargs@3.5.4, source-map@0.1.34)
├── esprima@1.2.5
└── node-libs-browser@0.4.3 (https-browserify@0.0.0, tty-browserify@0.0.0, constants-browserify@0.0.1, process@0.10.1, path-browserify@0.0.0, os-browserify@0.1.2, string_decoder@0.10.31, domain-browser@1.1.4, punycode@1.3.2, querystring-es3@0.2.1, assert@1.3.0, timers-browserify@1.4.0, stream-browserify@1.0.0, vm-browserify@0.0.4, events@1.0.2, console-browserify@1.1.0, util@0.10.3, url@0.10.3, readable-stream@1.1.13, http-browserify@1.7.0, buffer@3.2.1, browserify-zlib@0.1.4, crypto-browserify@3.2.8)

babel-core@4.7.16 node_modules/babel-core
├── slash@1.0.0
├── to-fast-properties@1.0.1
├── trim-right@1.0.0
├── shebang-regex@1.0.0
├── path-is-absolute@1.0.0
├── fs-readdir-recursive@0.1.1
├── leven@1.0.1
├── private@0.1.6
├── globals@6.4.1
├── esutils@1.1.6
├── estraverse@1.9.3
├── convert-source-map@0.5.1
├── js-tokens@1.0.0
├── debug@2.1.3 (ms@0.7.0)
├── is-integer@1.0.4 (is-finite@1.0.0, is-nan@1.0.1)
├── commander@2.8.0 (graceful-readlink@1.0.1)
├── ast-types@0.7.6
├── detect-indent@3.0.1 (get-stdin@4.0.1, minimist@1.1.1)
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3)
├── line-numbers@0.2.0 (left-pad@0.0.3)
├── output-file-sync@1.1.0 (xtend@4.0.0, mkdirp@0.5.0)
├── acorn-babel@0.11.1-38
├── repeating@1.1.2 (is-finite@1.0.0, meow@3.1.0)
├── source-map-support@0.2.10 (source-map@0.1.32)
├── source-map@0.4.2 (amdefine@0.1.0)
├── core-js@0.6.1
├── regexpu@1.1.2 (regjsgen@0.2.0, regenerate@1.2.1, regjsparser@0.1.4, recast@0.10.12)
├── regenerator-babel@0.8.13-2 (through@2.3.7, commoner@0.10.1)
└── lodash@3.7.0

browser-sync@2.6.4 node_modules/browser-sync
├── async-each-series@0.1.1
├── query-string@1.0.0
├── emitter-steward@0.0.1
├── opn@1.0.2
├── dev-ip@1.0.1
├── meow@3.1.0 (object-assign@2.0.0, camelcase-keys@1.0.0, minimist@1.1.1, indent-string@1.2.1)
├── ua-parser-js@0.7.6
├── foxy@10.1.1 (cookie@0.1.2, http-proxy@1.11.1)
├── portscanner@1.0.0 (async@0.1.15)
├── connect@3.3.5 (utils-merge@1.0.0, parseurl@1.3.0, debug@2.1.3, finalhandler@0.3.4)
├── resp-modifier@2.0.1 (minimatch@2.0.4)
├── browser-sync-client@2.0.1
├── immutable@3.7.2
├── serve-static@1.9.2 (utils-merge@1.0.0, escape-html@1.0.1, parseurl@1.3.0, send@0.12.2)
├── anymatch@1.3.0 (arrify@1.0.0, micromatch@2.1.6)
├── chokidar@1.0.1 (arrify@1.0.0, is-glob@1.1.3, glob-parent@1.2.0, async-each@0.1.6, is-binary-path@1.0.0, readdirp@1.3.0)
├── serve-index@1.6.3 (escape-html@1.0.1, parseurl@1.3.0, batch@0.5.2, debug@2.1.3, http-errors@1.3.1, accepts@1.2.5, mime-types@2.0.10)
├── easy-extender@2.3.1 (lodash@2.4.1)
├── localtunnel@1.5.0 (debug@0.7.4, optimist@0.3.4, request@2.11.4)
├── eazy-logger@2.1.2 (tfunk@3.0.1, opt-merger@1.1.0)
├── socket.io@1.3.5 (debug@2.1.0, has-binary-data@0.1.3, socket.io-adapter@0.3.1, engine.io@1.5.1, socket.io-parser@2.2.4, socket.io-client@1.3.5)
├── lodash@3.7.0
└── browser-sync-ui@0.5.7 (connect-history-api-fallback@0.0.5, angular-touch@1.3.15, angular-sanitize@1.3.15, angular-route@1.3.15, stream-throttle@0.1.3, angular@1.3.15, weinre@2.0.0-pre-I0Z7U9OV)

purescript@0.6.10 node_modules/purescript
├── async-each-series@0.1.1
├── logalot@2.1.0 (figures@1.3.5, squeak@1.2.0)
├── bin-build@2.1.1 (exec-series@1.0.1, url-regex@2.1.2, tempfile@1.1.0, archive-type@2.1.0, rimraf@2.3.2, download@3.3.0, decompress@2.3.0)
└── bin-wrapper@3.0.0 (os-filter-obj@1.0.3, bin-check@1.0.0, bin-version-check@2.1.0, globby@1.2.0, download@4.1.2)
squirrelzon $ gulp
[11:22:27] Local gulp not found in ~/Code/PureScript/squirrelzon
[11:22:27] Try running: npm install gulp
squirrelzon $ npm install gulp
npm WARN package.json squirrelzon@1.0.0 No repository field.
gulp@3.8.11 node_modules/gulp
├── pretty-hrtime@0.2.2
├── interpret@0.3.10
├── deprecated@0.0.1
├── archy@1.0.0
├── tildify@1.0.0 (user-home@1.1.1)
├── v8flags@2.0.5 (user-home@1.1.1)
├── minimist@1.1.1
├── chalk@0.5.1 (escape-string-regexp@1.0.3, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── semver@4.3.3
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── gulp-util@3.0.4 (array-differ@1.0.0, beeper@1.0.0, object-assign@2.0.0, array-uniq@1.0.2, lodash._reevaluate@3.0.0, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, replace-ext@0.0.1, chalk@1.0.0, vinyl@0.4.6, lodash.template@3.5.0, through2@0.6.5, multipipe@0.1.2, dateformat@1.0.11)
├── liftoff@2.0.3 (extend@2.0.0, flagged-respawn@0.3.1, resolve@1.1.6, findup-sync@0.2.1)
└── vinyl-fs@0.3.13 (graceful-fs@3.0.6, defaults@1.0.2, strip-bom@1.0.0, vinyl@0.4.6, mkdirp@0.5.0, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)
squirrelzon $ gulp
[11:23:03] Using gulpfile ~/Code/PureScript/squirrelzon/Gulpfile.js
[11:23:03] Starting 'copy-html'...
[11:23:03] Starting 'compile:purescript'...
[11:23:03] Starting 'serve'...
[11:23:03] Finished 'serve' after 88 ms
[BS] Access URLs:
 ---------------------------------------
       Local: http://localhost:3000
    External: http://192.168.178.35:3000
 ---------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.178.35:3001
 ---------------------------------------
[BS] Serving files from: ./dist
[11:23:03] Finished 'copy-html' after 254 ms
[11:23:03] Starting 'copy-assets'...
[11:23:03] Finished 'copy-assets' after 18 μs
[11:23:04] 'compile:purescript' errored after 460 ms
[11:23:04] Error in plugin 'gulp-purescript'
Message:
    psc-make
Error in module Squirrelzon.Types:
Error at /home/sebf/Code/PureScript/squirrelzon/src/purs/Squirrelzon/Types.purs line 4, column 1 - line 6, column 1:
  Unknown module Data.StrMap
See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information, or to contribute content related to this error.

^Csquirrelzon $ bower install
bower cached        git://github.com/purescript/purescript-maps.git#0.3.4
bower validate      0.3.4 against git://github.com/purescript/purescript-maps.git#~0.3.3
bower cached        git://github.com/purescript/purescript-tuples.git#0.3.4
bower validate      0.3.4 against git://github.com/purescript/purescript-tuples.git#~0.3.4
bower cached        git://github.com/purescript/purescript-math.git#0.1.1
bower validate      0.1.1 against git://github.com/purescript/purescript-math.git#~0.1.0
bower cached        git://github.com/purescript/purescript-foldable-traversable.git#0.3.1
bower validate      0.3.1 against git://github.com/purescript/purescript-foldable-traversable.git#~0.3.0
bower cached        git://github.com/purescript/purescript-arrays.git#0.3.7
bower validate      0.3.7 against git://github.com/purescript/purescript-arrays.git#~0.3.0
bower cached        git://github.com/purescript/purescript-monoid.git#0.2.0
bower validate      0.2.0 against git://github.com/purescript/purescript-monoid.git#~0.2.0
bower cached        git://github.com/purescript/purescript-maybe.git#0.2.2
bower validate      0.2.2 against git://github.com/purescript/purescript-maybe.git#~0.2.1
bower cached        git://github.com/purescript/purescript-control.git#0.2.6
bower validate      0.2.6 against git://github.com/purescript/purescript-control.git#~0.2.1
bower cached        git://github.com/purescript/purescript-strings.git#0.4.5
bower validate      0.4.5 against git://github.com/purescript/purescript-strings.git#~0.4.2
bower cached        git://github.com/purescript/purescript-either.git#0.1.8
bower validate      0.1.8 against git://github.com/purescript/purescript-either.git#~0.1.4
bower extra-resolution      Unnecessary resolution: purescript-tuples#0.3.4
bower extra-resolution      Unnecessary resolution: purescript-monoid#~0.2.0
bower extra-resolution      Unnecessary resolution: purescript-foldable-traversable#0.3.1
bower install               purescript-maps#0.3.4
bower install               purescript-tuples#0.3.4
bower install               purescript-math#0.1.1
bower install               purescript-foldable-traversable#0.3.1
bower install               purescript-arrays#0.3.7
bower install               purescript-monoid#0.2.0
bower install               purescript-maybe#0.2.2
bower install               purescript-control#0.2.6
bower install               purescript-strings#0.4.5
bower install               purescript-either#0.1.8

purescript-maps#0.3.4 bower_components/purescript-maps
├── purescript-arrays#0.3.7
├── purescript-foldable-traversable#0.3.1
├── purescript-math#0.1.1
├── purescript-maybe#0.2.2
├── purescript-strings#0.4.5
└── purescript-tuples#0.3.4

purescript-tuples#0.3.4 bower_components/purescript-tuples
├── purescript-arrays#0.3.7
├── purescript-control#0.2.6
└── purescript-monoid#0.2.0

purescript-math#0.1.1 bower_components/purescript-math

purescript-foldable-traversable#0.3.1 bower_components/purescript-foldable-traversable
├── purescript-arrays#0.3.7
├── purescript-control#0.2.6
├── purescript-either#0.1.8
├── purescript-maybe#0.2.2
├── purescript-monoid#0.2.0
└── purescript-tuples#0.3.4

purescript-arrays#0.3.7 bower_components/purescript-arrays
├── purescript-control#0.2.6
└── purescript-maybe#0.2.2

purescript-monoid#0.2.0 bower_components/purescript-monoid
├── purescript-arrays#0.3.7
└── purescript-maybe#0.2.2

purescript-maybe#0.2.2 bower_components/purescript-maybe
└── purescript-control#0.2.6

purescript-control#0.2.6 bower_components/purescript-control

purescript-strings#0.4.5 bower_components/purescript-strings
└── purescript-maybe#0.2.2

purescript-either#0.1.8 bower_components/purescript-either
└── purescript-control#0.2.6
squirrelzon $ gulp
[11:23:29] Using gulpfile ~/Code/PureScript/squirrelzon/Gulpfile.js
[11:23:29] Starting 'copy-html'...
[11:23:29] Starting 'compile:purescript'...
[11:23:29] Starting 'serve'...
[11:23:29] Finished 'serve' after 81 ms
[BS] Access URLs:
 ---------------------------------------
       Local: http://localhost:3000
    External: http://192.168.178.35:3000
 ---------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.178.35:3001
 ---------------------------------------
[BS] Serving files from: ./dist
[11:23:29] Finished 'copy-html' after 252 ms
[11:23:29] Starting 'copy-assets'...
[11:23:29] Finished 'copy-assets' after 18 μs
[11:23:33] Finished 'compile:purescript' after 4.19 s
[11:23:33] Starting 'build'...
[11:23:35] Version: webpack 1.8.9
    Asset    Size  Chunks             Chunk Names
js/app.js  774 kB       0  [emitted]  main

ERROR in ./~/babel-loader!./output/Squirrelzon.Ui.Render/index.js
Module not found: Error: Cannot resolve module 'Webshop' in /home/sebf/Code/PureScript/squirrelzon/output/Squirrelzon.Ui.Render
 @ ./~/babel-loader!./output/Squirrelzon.Ui.Render/index.js 15:30-54
[11:23:35] Finished 'build' after 2.27 s
[11:23:35] Starting 'default'...
[11:23:35] Finished 'default' after 11 μs
^Csquirrelzon $
kritzcreek commented 9 years ago

Hi @sebfisch! The scaffolding for episode 1 can be found in the branch episode-1. I should've put in a direct link to that branch.. You're currently looking at an unfinished Episode 2 state for which I didn't finish the next post yet.

I'm however curious as to why gulp fails since it completes just fine on my machine.

So as a first fix I suggest you remove all the packaged files:

rm -r output
rm -r node_modules
rm -r bower_components

Then git checkout episode-1 and work from there.

And I'll get around finishing episode-2 and find a way to make imports less ambigous for webpack.