Skip to content

Error: Cannot find module '@workshop/server' #49

Closed

Description

@jrweinb

Hello,

After installing the npm module, I try to run the app with "webgl-workshop" and I get the following error after typing Yes for populating the directory:

module.js:340
    throw err;
          ^
Error: Cannot find module '@workshop/server'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at boot (/usr/local/lib/node_modules/webgl-workshop/node.js:49:3)
    at PromptUI.completed (/usr/local/lib/node_modules/webgl-workshop/node.js:44:5)
    at PromptUI.onCompletion (/usr/local/lib/node_modules/webgl-workshop/node_modules/inquirer/lib/ui/prompt.js:51:10)
    at /usr/local/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:254:17
    at /usr/local/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:157:25
    at /usr/local/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:251:21

Activity

  1. hughsk commented on Nov 5, 2014

    @hughsk
    Member

    @jrweinb could you let me know the following?

    • Your OS
    • Version of Node
    • Version of NPM
    • Your NPM install output

    Thanks!

  2. cliche23 commented on Nov 7, 2014

    @cliche23

    Same here
    OSX Maverick
    Node 0.10.33
    npm 1.4.28

  3. julien commented on Nov 7, 2014

    @julien

    Hi guys,

    Actually had the same issue (same config as @cliche23), installing the module locally worked.
    Hope it helps

  4. jrweinb commented on Nov 7, 2014

    @jrweinb
    Author

    Hi - I got this to work by upgrading my npm to v 2.1.7. The line in my first failed install attempt that prompted me to upgrade npm was:
    npm WARN engine linklocal@2.0.1: wanted: {"npm":">=2.0.0"} (current: {"node":"v0.10.26","npm":"1.4.3"})
    The latest version installed with the latest Node is 1.4.3 so this has to be manually re-installed or upgraded.

  5. hughsk commented on Nov 7, 2014

    @hughsk
    Member

    Though I recommend that everybody here upgrades their version of npm, we've set it up such that you shouldn't need npm>=2.0.0.

    That linklocal warning is a red herring, it's not a required dependency when running the workshop globally. I installed npm@1.4.8 and tried installing it myself both with and without sudo, and didn't have any problems. If one of you guys could post the npm install log when installing and running into this error I can look into it further :)

  6. cliche23 commented on Nov 11, 2014

    @cliche23

    I upgraded npm, still the same error.
    $ npm -v
    2.1.7

    Here is the install log:

    $ sudo npm install webgl-workshop (I tried to install it locally as @julien suggested)

    fsevents@0.2.1 install /Users/martinsbergmanis/dev/node_modules/webgl-workshop/node_modules/watchify/node_modules/chokidar/node_modules/fsevents
    node-gyp rebuild

    CXX(target) Release/obj.target/fse/fsevents.o
    SOLINK_MODULE(target) Release/fse.node
    SOLINK_MODULE(target) Release/fse.node: Finished

    fsevents@0.2.1 install /Users/martinsbergmanis/dev/node_modules/webgl-workshop/node_modules/beefy/node_modules/chokidar/node_modules/fsevents
    node-gyp rebuild

    CXX(target) Release/obj.target/fse/fsevents.o
    SOLINK_MODULE(target) Release/fse.node
    SOLINK_MODULE(target) Release/fse.node: Finished
    webgl-workshop@1.0.7 node_modules/webgl-workshop
    ├── normals@0.1.0
    ├── unindex-mesh@1.0.1
    ├── opener@1.4.0
    ├── sidenote@1.0.0
    ├── findup-element@0.0.0
    ├── canvas-pixels@0.0.0
    ├── escape-html@1.0.1
    ├── fs-readdir-recursive@0.0.2
    ├── inherits@2.0.1
    ├── google-fonts@0.0.0
    ├── defaultcss@1.1.1
    ├── glsldoc@0.0.4
    ├── gl-reset@1.0.0
    ├── quotemeta@0.0.0
    ├── domify@1.3.1
    ├── face-normals@0.0.0
    ├── wordwrap@0.0.2
    ├── teapot@1.0.0
    ├── minimist@1.1.0
    ├── marked@0.3.2
    ├── bunny@1.0.1
    ├── events@1.0.2
    ├── canvas-fit@1.2.0 (element-size@1.1.1)
    ├── gl-context@0.1.1 (raf-component@1.1.2)
    ├── gl-clear@0.0.1 (gl-context@0.0.0)
    ├── gl-api@1.0.2
    ├── mousetrap@0.0.1
    ├── mkdirp@0.5.0 (minimist@0.0.8)
    ├── resolve@1.0.0
    ├── parse-obj@0.0.0 (split@0.2.10)
    ├── gl-shader-core@2.2.0 (dup@1.0.0)
    ├── simplicial-complex@1.0.0 (union-find@1.0.1, bit-twiddle@1.0.2)
    ├── chalk@0.5.1 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
    ├── findup@0.1.5 (commander@2.1.0, colors@0.6.2)
    ├── rework-plugin-inline@1.0.1 (mime@1.2.11, rework-plugin-function@1.0.1)
    ├── cpr@0.3.2 (graceful-fs@1.2.3, mkdirp@0.3.5, rimraf@2.0.3)
    ├── gl-matrix@2.1.0
    ├── linklocal@2.1.3 (commander@2.3.0, rimraf@2.2.8, once@1.3.1, debug@2.0.0)
    ├── gl-compare-sidebar@1.1.4 (remove-element@0.0.0, insert-css@0.1.1, range-slider@1.0.2)
    ├── minstache@1.2.0 (commander@1.0.4)
    ├── bl@0.9.3 (readable-stream@1.0.33)
    ├── browser-menu@1.0.1 (remove-element@0.0.0, vkey@0.0.3, insert-css@0.1.1, xtend@2.2.0, terminal-menu@0.2.0)
    ├── gl-geometry@1.0.0 (is-typedarray@0.0.0, isndarray@0.1.0, array-pack-2d@0.1.0, dtype@0.1.0, gl-vao@1.2.0, gl-buffer@2.1.1)
    ├── st@0.5.2 (graceful-fs@1.2.3, negotiator@0.2.8, mime@1.2.11, async-cache@0.1.5, fd@0.0.2, bl@0.8.2)
    ├── gl-compare@2.0.1 (a-big-triangle@0.0.0, gl-fbo@1.1.3)
    ├── xhr@1.17.0 (once@1.1.1, global@4.3.0, parse-headers@2.0.0)
    ├── rework@1.0.1 (convert-source-map@0.3.5, css@2.1.0)
    ├── highlight.js@8.3.0
    ├── canvas-orbit-camera@1.0.1 (mouse-position@1.0.0, mouse-pressed@0.0.1, key-pressed@0.0.1, scroll-speed@1.0.0, orbit-camera@0.0.3)
    ├── watchify@2.1.0 (through2@0.5.1, chokidar@0.8.4)
    ├── cheerio@0.17.0 (dom-serializer@0.0.1, entities@1.1.1, htmlparser2@3.7.3, CSSselect@0.4.1, lodash@2.4.1)
    ├── envify@3.1.0 (through@2.3.6, jstransform@7.0.0)
    ├── brfs@1.2.0 (quote-stream@0.0.0, through2@0.4.2, static-module@1.0.0)
    ├── fresh-require@1.0.3 (is-require@0.0.1, shallow-copy@0.0.1, sleuth@0.1.1, through2@0.6.3, escodegen@1.4.1, astw@1.2.0, acorn@0.9.0)
    ├── inquirer@0.5.1 (readline2@0.1.0, mute-stream@0.0.4, through@2.3.6, chalk@0.4.0, async@0.8.0, lodash@2.4.1, cli-color@0.3.2)
    ├── beefy@2.1.1 (leftpad@0.0.0, pretty-bytes@0.1.2, ansicolors@0.3.2, find-global-packages@0.0.1, which@1.0.5, ignorepatterns@1.0.1, response-stream@0.0.0, through@2.2.7, open@0.0.3, minimist@0.0.8, mime@1.2.11, portfinder@0.2.1, xtend@2.1.2, readable-stream@1.0.33, resolve@0.6.3, concat-stream@1.4.6, chokidar@0.8.4, script-injector@0.1.7)
    ├── browserify@6.3.2 (https-browserify@0.0.0, tty-browserify@0.0.0, builtins@0.0.7, constants-browserify@0.0.1, path-browserify@0.0.0, process@0.8.0, os-browserify@0.1.2, isarray@0.0.1, commondir@0.0.1, string_decoder@0.10.31, stream-browserify@1.0.0, defined@0.0.0, domain-browser@1.1.3, shell-quote@0.0.1, subarg@1.0.0, shallow-copy@0.0.1, xtend@3.0.0, deep-equal@0.2.1, assert@1.1.2, querystring-es3@0.2.1, punycode@1.2.4, url@0.10.1, util@0.10.3, timers-browserify@1.1.0, parents@0.0.3, vm-browserify@0.0.4, console-browserify@1.1.0, http-browserify@1.7.0, readable-stream@1.0.33, deps-sort@1.3.5, shasum@1.0.0, buffer@2.8.1, through2@1.1.1, duplexer2@0.0.2, resolve@0.7.4, concat-stream@1.4.6, labeled-stream-splicer@1.0.0, JSONStream@0.8.4, browser-pack@3.2.0, glob@4.0.6, umd@2.1.0, syntax-error@1.1.1, insert-module-globals@6.1.0, module-deps@3.5.6, browserify-zlib@0.1.4, crypto-browserify@3.3.0)
    ├── myth@1.2.1 (rework-custom-media@0.1.1, is-browser@2.0.1, node-watch@0.3.4, pad-component@0.0.1, write-file-stdout@0.0.2, rework-rebeccapurple@1.0.1, commander@2.5.0, rework-font-variant@1.0.1, colors@0.6.2, rework-hex-alpha@1.0.0, rework-calc@1.1.0, rework-vars@3.1.1, read-file-stdin@0.2.0, clone-component@0.2.2, to-space-case@0.1.3, to-slug-case@0.1.2, rework-import@1.2.1, rework-color-function@1.1.1, autoprefixer-core@3.1.2)
    ├── brstar@0.1.0 (ast-parents@0.0.1, debug@0.7.4, static-eval@0.1.1, through@2.3.6, sleuth@0.1.1, resolve@0.6.3, escodegen@1.4.1, esprima@1.2.2, astw@1.2.0, replace-method@0.0.0)
    └── glslify@1.6.0 (cssauron-glsl@0.0.0, emit-function@0.0.2, shortest@0.0.0, cssauron@0.0.2, through@2.3.6, glsl-min-stream@0.0.2, nopt@2.2.1, glsl-deparser@0.0.2, resolve@0.6.3, new-from@0.0.3, concat-stream@1.4.6, glsl-extract@0.0.2, glslify-stream@0.4.1, esprima@1.2.2, static-eval@0.2.3, sleuth@0.0.0, replace-method@0.0.0)

  7. hughsk commented on Nov 12, 2014

    @hughsk
    Member

    @cliche23 I can't see an error in your log, are you sure it's not working for you? When you're running the workshop locally, you need to run npm install without sudo, followed by npm start to start up the workshop :)

  8. hughsk commented on Nov 12, 2014

    @hughsk
    Member

    Ah, actually, if you're running it locally you should try npm run dev instead of npm start :)

  9. cliche23 commented on Nov 14, 2014

    @cliche23

    Now it's working, thank you!

  10. hughsk commented on Nov 14, 2014

    @hughsk
    Member

    Great! Closing :)

  11. jb55 commented on Nov 20, 2014

    @jb55

    This is happening for me as well, tried on:

    Mavericks

    node 0.10.26
    npm 1.4.6
    

    and

    node 0.11.14
    npm 2.0.0
    
    node 0.10.33
    npm 2.0.0
    

    both sudo and non-sudo on both.

    everytime I get this message when running webgl-workshop:

    ==============================
     = ~~~~~ webgl-workshop ~~~~~ =
     ==============================
    
    [?] We're about to populate this directory with some code for you to use for
        your answers. If they've already been created then don't worry, they won't
        be replaced. Continue? Yes
    
    module.js:338
        throw err;
              ^
    Error: Cannot find module '@workshop/server'
        at Function.Module._resolveFilename (module.js:336:15)
        at Function.Module._load (module.js:278:25)
        at Module.require (module.js:365:17)
        at require (module.js:384:17)
        at boot (/Users/jb55/.nvm/v0.11.14/lib/node_modules/webgl-workshop/node.js:49:3)
        at PromptUI.completed (/Users/jb55/.nvm/v0.11.14/lib/node_modules/webgl-workshop/node.js:44:5)
        at PromptUI.onCompletion (/Users/jb55/.nvm/v0.11.14/lib/node_modules/webgl-workshop/node_modules/inquirer/lib/ui/prompt.js:51:10)
        at /Users/jb55/.nvm/v0.11.14/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:254:17
        at /Users/jb55/.nvm/v0.11.14/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:157:25
        at /Users/jb55/.nvm/v0.11.14/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:251:21
    
  12. jb55 commented on Nov 20, 2014

    @jb55

    Finally got it running by cloning locally and using npm install in 0.10.33 with npm 2. Perhaps the version published to npm is messed up? Not very friendly for newcomers :(

  13. teknotus commented on Nov 20, 2014

    @teknotus

    I get
    $ webgl-workshop

    ==============================
    = ~~~~~ webgl-workshop ~~~~~ =

    [?] We're about to populate this directory with some code for you to use for
    your answers. If they've already been created then don't worry, they won't
    be replaced. Continue? Yes

    module.js:340
    throw err;
    ^
    Error: Cannot find module '@workshop/server'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at boot (/home/teknotus/toolchain/node/node01022/lib/node_modules/webgl-workshop/node.js:49:3)
    at PromptUI.completed (/home/teknotus/toolchain/node/node01022/lib/node_modules/webgl-workshop/node.js:44:5)
    at PromptUI.onCompletion (/home/teknotus/toolchain/node/node01022/lib/node_modules/webgl-workshop/node_modules/inquirer/lib/ui/prompt.js:51:10)
    at /home/teknotus/toolchain/node/node01022/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:254:17
    at /home/teknotus/toolchain/node/node01022/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:157:25
    at /home/teknotus/toolchain/node/node01022/lib/node_modules/webgl-workshop/node_modules/inquirer/node_modules/async/lib/async.js:251:21

  14. jsgoller1 commented on Jan 4, 2015

    @jsgoller1

    I got almost exactly the same error message on Linux when using npm install, both locally and globally. Solved it by cloning locally, using make, and then running the node.js file.

    uname -a: Linux computer 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    node -v: v0.10.25
    npm -v: 2.1.17

  15. ezekeal commented on Apr 18, 2016

    @ezekeal

    same issue

  16. msfeldstein commented on Jan 24, 2017

    @msfeldstein

    Perhaps we should remove the instructions to install globally if that doesn't seem to work for most people (including me)?

  17. LeeeRoux commented on Dec 4, 2018

    @LeeeRoux

    Same issue,
    Windows 8.1
    Node 8.11.1
    Npm 6.4.1

  18. keli95566 commented on Apr 29, 2020

    @keli95566

    same issue
    Mac
    Node 14.0.0
    Npm 6.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions