Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer-browser example throw error in internal/modules/cjs/loader.js #3007

Closed
TrantorM opened this issue Apr 20, 2019 · 4 comments
Closed

layer-browser example throw error in internal/modules/cjs/loader.js #3007

TrantorM opened this issue Apr 20, 2019 · 4 comments
Labels

Comments

@TrantorM
Copy link

I can't get the example running. It throws an error in internal/modules/cjs/loader.js because it can't find module 'ocular-dev-tools/config/ocular.config'. I found this issue, but removing the node_modules folder and reinstalling it didn't help. Any idea?

iMac:layer-browser Marcello$ npm run start-local

> [email protected] start-local /Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/examples/layer-browser
> webpack-dev-server --env.es6 --progress --hot --open

internal/modules/cjs/loader.js:670
    throw err;
    ^

Error: Cannot find module 'ocular-dev-tools/config/ocular.config'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/examples/webpack.config.local.js:14:17)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start-local: `webpack-dev-server --env.es6 --progress --hot --open`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start-local script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Marcello/.npm/_logs/2019-04-20T00_34_13_721Z-debug.log
@xintongxia
Copy link
Contributor

go to deck.gl root directory and yarn bootstrap to install the dev dependencies.

@TrantorM
Copy link
Author

@xintongxia yarn bootstrap ends with error:

iMac:deck.gl Marcello$ yarn bootstrap
yarn run v1.15.2
$ yarn && ocular-bootstrap
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning " > [email protected]" has unmet peer dependency "webpack@>=2".
warning " > [email protected]" has unmet peer dependency "eslint@>=3.14.1".
warning " > [email protected]" has unmet peer dependency "eslint@>= 3.0.0 < 5".
warning "eslint-config-uber-jsx > [email protected]" has unmet peer dependency "eslint@>= 3.0.0 < 5".
warning "eslint-config-uber-jsx > [email protected]" has unmet peer dependency "eslint@^2.0.0 || ^3.0.0".
warning " > [email protected]" has unmet peer dependency "[email protected] - 5.x".
warning " > [email protected]" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0".
[4/4] 🔨  Building fresh packages...
[1/6] ⠠ puppeteer
[2/6] ⠠ gl
[-/6] ⠠ waiting...
[-/6] ⠠ waiting...
error /Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/gl: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/gl
Output:
prebuild-install WARN install No prebuilt binaries found (target=11.14.0 runtime=node arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/gl/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Marcello/.node-gyp/11.14.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/Marcello/.node-gyp/11.14.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/Marcello/.node-gyp/11.14.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/gl',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/angle_common/angle/src/common/Float16ToFloat32.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/MemoryBuffer.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/angleutils.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/debug.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/mathutil.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/string_utils.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/tls.o
  CXX(target) Release/obj.target/angle_common/angle/src/common/utilities.o
  LIBTOOL-STATIC Release/angle_common.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [Release/angle_common.a] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/Cellar/node/11.14.0_1/bin/node" "/Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/gl/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/Marcello/Documents/Studium/Archaeologie/Projekte/mapbox/deck.gl/node_modules/gl




error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
iMac:deck.gl Marcello$ 

@ibgreen
Copy link
Collaborator

ibgreen commented Apr 24, 2019

  1. I assume just running the layer browser from installed deck.gl modules works:
cd examples/layer-browser
yarn
yarn start
  1. If you want to build the layer browser agains local deck.gl code using yarn start-local.
  • From you log: headless gl does not install/build on your machine for some reason.
  • gl is only installed for debugging/test purposes it is not required to run the example.
  • You could just remove the gl entry from the top-level deck.gl package.json and run bootstrap again.

@TrantorM
Copy link
Author

I could finally get the example running.

To build gl on my mac (el capitan), this procedure worked:

brew unlink libtool
rm -rf /usr/local/bin/libtool
which libtool
brew link libtool

which libtool should point to /usr/bin/libtool.

Then yarn bootstrap in the deck.gl root directory works fine. Then:

cd examples/layer-browser
yarn
yarn start-local

Thx for the help

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

No branches or pull requests

3 participants