Code Monkey home page Code Monkey logo

create-hdom-app's People

Contributors

100ideas avatar loganpowell avatar postspectacular avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

create-hdom-app's Issues

add @types/node package to support `process.env`

yarn create hdom-app (v0.3.0) produces a default project scaffold that leads to a typescript compile error. Type definitions for node are not included so the ts compiler chokes on the reference to process.env.NODE_ENV in index.ts.

One solution is to add @types/node to package.json devDependencies. Not sure if that's overkill or if there is another preferred way of setting up the environment around the output of create-hdom-app. Maybe most people already have node ts type definitions installed globally?

Thanks so much for this fantastic collection of packages! I am becoming a better programmer thanks to the excellent documentation, examples, and modularity of your "umbrella" project.

error:

[tsl] ERROR in /Users/100ideas/dev/hdom/1_helloworld/src/index.ts(6,5)
      TS2304: Cannot find name 'process'.

log:

❯ yarn create hdom-app 1_helloworld
yarn create v1.5.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-hdom-app
[##################] 18/18Creating a new app "1_helloworld" in /Users/100ideas/dev/hdom/1_helloworld...
...

❯ cd 1_helloworld && yarn start
yarn run v1.5.1
$ webpack-dev-server --hot --open --mode development --devtool inline-source-map
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from public
ℹ 「wdm」: wait until bundle finished: /
✖ 「wdm」: Hash: 10cb48300d19dfe5a9cd
Version: webpack 4.5.0
Time: 1819ms
Built at: 4/6/2018 3:50:53 AM
    Asset      Size  Chunks             Chunk Names
bundle.js  1.12 MiB    main  [emitted]  main
Entrypoint main = bundle.js
[./node_modules/loglevel/lib/loglevel.js] 7.68 KiB {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/url/url.js] 22.8 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 7.75 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.58 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.05 KiB {main} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.66 KiB {main} [built]
[./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 77 bytes {main} [built]
[./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.31 KiB {main} [built]
[./node_modules/webpack/hot/log.js] (webpack)/hot/log.js 1.03 KiB {main} [built]
[./src/app.ts] 3.35 KiB {main} [built]
   [0] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/index.ts 52 bytes {main} [built]
[./src/config.ts] 4.38 KiB {main} [built]
[./src/index.ts] 392 bytes {main} [built] [1 error]
    + 57 hidden modules

ERROR in /Users/100ideas/dev/hdom/1_helloworld/src/index.ts
./src/index.ts
[tsl] ERROR in /Users/100ideas/dev/hdom/1_helloworld/src/index.ts(6,5)
      TS2304: Cannot find name 'process'.
ℹ 「wdm」: Failed to compile.
^C⏎

~/dev/hdom/1_helloworld
❯ yarn add -D @types/node   
yarn add v1.5.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @types/[email protected]
info All dependencies
└─ @types/[email protected]
✨  Done in 3.32s.
 
~/dev/hdom/1_helloworld 
❯ yarn start            
yarn run v1.5.1
$ webpack-dev-server --hot --open --mode development --devtool inline-source-map
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from public
ℹ 「wdm」: wait until bundle finished: /
ℹ 「wdm」: Hash: 5b5f1821623d6ea68f60
Version: webpack 4.5.0
Time: 1970ms
Built at: 4/6/2018 3:57:08 AM
    Asset      Size  Chunks             Chunk Names
bundle.js  1.12 MiB    main  [emitted]  main
Entrypoint main = bundle.js
[./node_modules/loglevel/lib/loglevel.js] 7.68 KiB {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/url/url.js] 22.8 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 7.75 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.58 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.05 KiB {main} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.66 KiB {main} [built]
[./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 77 bytes {main} [built]
[./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.31 KiB {main} [built]
[./node_modules/webpack/hot/log.js] (webpack)/hot/log.js 1.03 KiB {main} [built]
[./src/app.ts] 3.35 KiB {main} [built]
   [0] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/index.ts 52 bytes {main} [built]
[./src/config.ts] 4.38 KiB {main} [built]
[./src/index.ts] 392 bytes {main} [built]
    + 57 hidden modules
ℹ 「wdm」: Compiled successfully.
^C⏎

Old version on npm doesn't work

After doing yarn create hdom-app my-app and yarn install just now I'm seeing the same error that was reported in #3 and #5.

It looks like this picks up version 0.4.3 of create-hdom-app from npm. Oddly that version doesn't appear to exist among the tags in this repo and appears to be higher than the version in the package.json from the HEAD commit. The generate.js file included in the npm version includes "webpack": "^4.6.0" which I gather is causing this problem.

It looks like the code in HEAD has more up to date versions of this dependency. Perhaps a new version should be released to npm?

Alternatively, as suggested here, perhaps a github-template might be simpler.

yarn error on start

Following the instructions I got this yarn error on yarn start

yarn run v1.10.1
$ webpack-dev-server --open --mode development --devtool inline-source-map
/Users/ac/Projects/18-09-instore/code/prototyping/ui/my-app/node_modules/webpack-cli/bin/config-yargs.js:89
				describe: optionsSchema.definitions.output.properties.path.description,
				                                           ^

TypeError: Cannot read property 'properties' of undefined

[create-hdom-app] Error on `yarn start`

Getting this on yarn start

λ yarn start
yarn run v1.17.3
$ webpack-dev-server --open --mode development --devtool inline-source-map
C:\Users\logan\Projects\thi-ng\hdom_app\node_modules\webpack-cli\bin\config-yargs.js:

describe: optionsSchema.definitions.output.properties.path.description,
                                           ^

TypeError: Cannot read property 'properties' of undefined
    at module.exports (C:\Users\logan\Projects\thi-ng\hdom_app\node_modules\webpack-cli\bin\config-yargs.js:89:48)
    at Object.<anonymous> (C:\Users\logan\Projects\thi-ng\hdom_app\node_modules\webpack-dev-server\bin\webpack-dev-server.js:65:25)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

any pointers?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.