teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.91k stars 930 forks source link

ModuleNotFoundError: Module not found: Error: Can't resolve 'emotion' #1001

Closed painedpineapple closed 6 years ago

painedpineapple commented 6 years ago

Expected Behavior

Bit will resolve all npm modules for components

Actual Behavior

Bit fails to resolve the 'emotion' import

Steps to Reproduce the Problem

  1. File with react component imports another file with Emotion "styled component",
  2. That secondary file imports the npm module 'emotion', which doesn't resolve.

You can see the component and error here: https://bitsrc.io/seamonster-studios/react/components/button

Specifications

itaymendel commented 6 years ago

hi @thislogancall Bit did resolve the dependency correctly (otherwise it would not allow you to tag or export the component). I guess that the error you see is in the 'live palyground' feature, and I want to look into it. can you please add me as a 'developer' to your scope, so I can see the error message? my email is itay@bitsrc.io .

painedpineapple commented 6 years ago

That makes sense. I've added you as a dev to the scope. Thank you.

itaymendel commented 6 years ago

ok, so my guess was right. the problem is when in the backend Bit tries to bundle the component and failed. I was able to reproduce the issue on my own system. In order to solve it, I think I'll need your webpack configuration. Can you please share the project's original webpack configuration, so i can try and create a specific configuration for it?

painedpineapple commented 6 years ago

I'm using the default configuration within react-static, which I believe is based on the create-react-app webpack config. The following is the config in JSON after adding the babel-polyfill plugin:

{
  "context":
    "/Users/logan/code/clean/seamonsterstudios/node_modules/react-static/node_modules",
  "entry": [
    "babel-polyfill",
    "/Users/logan/code/clean/seamonsterstudios/node_modules/react-hot-loader/patch.js",
    "/Users/logan/code/clean/seamonsterstudios/node_modules/react-dev-utils/webpackHotDevClient.js",
    "/Users/logan/code/clean/seamonsterstudios/node_modules/webpack/hot/only-dev-server.js",
    "/Users/logan/code/clean/seamonsterstudios/src/index.js"
  ],
  "output": {
    "filename": "app.[hash:8].js",
    "path": "/Users/logan/code/clean/seamonsterstudios/tmp/dev-server",
    "publicPath": "/"
  },
  "module": {
    "rules": [
      {
        "oneOf": [
          {
            "test": {},
            "exclude": "/Users/logan/code/clean/seamonsterstudios/node_modules",
            "use": [
              {
                "loader": "babel-loader",
                "options": { "cacheDirectory": true }
              }
            ]
          },
          {
            "test": {},
            "loader": [
              "style-loader",
              {
                "loader": "css-loader",
                "options": {
                  "importLoaders": 1,
                  "minimize": false,
                  "sourceMap": false
                }
              },
              {
                "loader": "postcss-loader",
                "options": { "sourceMap": true, "ident": "postcss" }
              }
            ]
          },
          {
            "loader": "url-loader",
            "exclude": [{}, {}, {}],
            "query": { "limit": 10000, "name": "static/[name].[hash:8].[ext]" }
          }
        ]
      }
    ]
  },
  "resolve": {
    "modules": [
      "/Users/logan/code/clean/seamonsterstudios/node_modules/react-static/node_modules",
      "node_modules",
      "/Users/logan/code/clean/seamonsterstudios/node_modules",
      "/Users/logan/code/clean/seamonsterstudios/src",
      "/Users/logan/code/clean/seamonsterstudios/tmp/dev-server"
    ],
    "extensions": [".js", ".json", ".jsx"]
  },
  "plugins": [
    {
      "keys": [
        "npm_config_save_dev",
        "npm_config_legacy_bundling",
        "npm_config_dry_run",
        "npm_package_dependencies_flow_typed",
        "VSCODE_NODE_CACHED_DATA_DIR_259",
        "npm_config_viewer",
        "npm_config_only",
        "npm_config_commit_hooks",
        "npm_config_browser",
        "npm_package_gitHead",
        "npm_package_devDependencies_prettier",
        "npm_package_devDependencies_identity_obj_proxy",
        "npm_package_dependencies_redux",
        "npm_config_also",
        "npm_config_rollback",
        "npm_package_dependencies_redux_immutable_state_invariant",
        "TERM_PROGRAM",
        "NODE",
        "npm_config_usage",
        "LESS_TERMCAP_md",
        "INIT_CWD",
        "npm_package_dependencies_moment",
        "npm_package_dependencies_hamburgers",
        "npm_package_dependencies_axios",
        "ANDROID_HOME",
        "NVM_CD_FLAGS",
        "npm_config_globalignorefile",
        "npm_package_dependencies_eslint",
        "SHELL",
        "TERM",
        "npm_config_shell",
        "npm_config_maxsockets",
        "npm_config_init_author_url",
        "npm_config__bit_registry",
        "HISTSIZE",
        "npm_config_shrinkwrap",
        "npm_config_parseable",
        "npm_config_metrics_registry",
        "TMPDIR",
        "npm_config_timing",
        "npm_config_init_license",
        "Apple_PubSub_Socket_Render",
        "npm_config_if_present",
        "npm_package_devDependencies_concurrently",
        "npm_package_dependencies_react_spring",
        "npm_package_dependencies_dompurify",
        "npm_package_scripts_test_update",
        "TERM_PROGRAM_VERSION",
        "npm_config_sign_git_tag",
        "npm_config_init_author_email",
        "npm_config_cache_max",
        "npm_package_dependencies_react_emotion",
        "npm_config_long",
        "npm_config_local_address",
        "npm_config_git_tag_version",
        "npm_config_cert",
        "npm_package_dependencies_jest_emotion",
        "npm_config_registry",
        "npm_config_fetch_retries",
        "npm_package_dependencies_react_dom",
        "npm_package_dependencies_babel_loader",
        "LC_ALL",
        "npm_config_versions",
        "npm_config_message",
        "npm_config_key",
        "npm_package_readmeFilename",
        "npm_package_dependencies_redux_devtools_extension",
        "npm_package_description",
        "npm_package_dependencies_why_did_you_update",
        "USER",
        "HISTFILESIZE",
        "NVM_DIR",
        "PYTHONIOENCODING",
        "npm_package_license",
        "npm_package_dependencies_emotion_theming",
        "COMMAND_MODE",
        "npm_config_globalconfig",
        "npm_package_dependencies_graphcms_image",
        "npm_config_prefer_online",
        "npm_config_logs_max",
        "npm_config_always_auth",
        "npm_package_dependencies_graphql_request",
        "SSH_AUTH_SOCK",
        "NODE_REPL_MODE",
        "__CF_USER_TEXT_ENCODING",
        "npm_execpath",
        "npm_config_global_style",
        "npm_config_cache_lock_retries",
        "npm_package_dependencies_babel_jest",
        "npm_package_prettier_trailingComma",
        "npm_config_cafile",
        "npm_package_dependencies_react_redux",
        "npm_package_dependencies_ramda",
        "npm_config_heading",
        "npm_config_searchlimit",
        "npm_config_read_only",
        "npm_config_offline",
        "npm_config_fetch_retry_mintimeout",
        "npm_config_json",
        "npm_config_access",
        "npm_config_argv",
        "PATH",
        "npm_config_allow_same_version",
        "npm_config_https_proxy",
        "npm_config_engine_strict",
        "npm_config_description",
        "npm_package_dependencies__seamonster_studios_embed_svgs",
        "_",
        "npm_config_userconfig",
        "npm_config_init_module",
        "npm_package_dependencies_redux_thunk",
        "npm_package_jest_moduleNameMapper____jpg_jpeg_png_gif_eot_otf_webp_svg_ttf_woff_woff2_mp4_webm_wav_mp3_m4a_aac_oga__",
        "npm_config_cidr",
        "npm_package_prettier_singleQuote",
        "PWD",
        "npm_config_user",
        "npm_config_node_version",
        "npm_lifecycle_event",
        "npm_package_dependencies_jest",
        "npm_package_jest_collectCoverageFrom_4",
        "EDITOR",
        "npm_config_save",
        "npm_config_ignore_prepublish",
        "npm_config_editor",
        "npm_config_auth_type",
        "npm_package_jest_collectCoverageFrom_3",
        "npm_package_name",
        "LANG",
        "npm_config_tag",
        "npm_config_script_shell",
        "npm_package_dependencies_string_hash",
        "npm_package_dependencies_eslint_plugin_babel",
        "npm_package_jest_collectCoverageFrom_2",
        "npm_config_progress",
        "npm_config_global",
        "npm_package_jest_collectCoverageFrom_1",
        "npm_package_scripts_build",
        "npm_package_scripts_start_all",
        "npm_package_scripts_start",
        "npm_config_searchstaleness",
        "npm_config_optional",
        "npm_config_ham_it_up",
        "npm_package_devDependencies_faker",
        "npm_package_dependencies_babel_preset_env",
        "npm_package_dependencies_babel_core",
        "npm_package_jest_collectCoverageFrom_0",
        "XPC_FLAGS",
        "npm_config_save_prod",
        "npm_config_force",
        "npm_config_bin_links",
        "npm_package_devDependencies_eslint_config_react_tools",
        "npm_package_dependencies_eslint_plugin_react",
        "npm_config_searchopts",
        "npm_config_node_gyp",
        "npm_config_depth",
        "npm_package_dependencies_emotion_server",
        "npm_package_main",
        "npm_config_sso_poll_frequency",
        "npm_config_rebuild_bundle",
        "npm_package_scripts_sp",
        "npm_package_version",
        "XPC_SERVICE_NAME",
        "HISTCONTROL",
        "npm_config_unicode",
        "HOME",
        "MANPAGER",
        "SHLVL",
        "npm_config_fetch_retry_maxtimeout",
        "npm_package_scripts_test",
        "npm_config_tag_version_prefix",
        "npm_config_strict_ssl",
        "npm_config_sso_type",
        "npm_config_scripts_prepend_node_path",
        "npm_config_save_prefix",
        "npm_config_loglevel",
        "npm_config_ca",
        "npm_package_devDependencies_lodash",
        "npm_package_dependencies_dotenv",
        "npm_package_scripts_serve",
        "VSCODE_NLS_CONFIG",
        "npm_config_save_exact",
        "npm_config_group",
        "npm_config_fetch_retry_factor",
        "npm_config_dev",
        "npm_config_version",
        "npm_config_prefer_offline",
        "npm_config_cache_lock_stale",
        "npm_package_dependencies_eslint_plugin_jest",
        "npm_package_dependencies_babel_eslint",
        "npm_package_prettier_semi",
        "npm_config_otp",
        "npm_config_cache_min",
        "npm_config_searchexclude",
        "npm_config_cache",
        "npm_package_scripts_test_coverage",
        "npm_package_scripts_format_watch",
        "npm_package_scripts_format",
        "LOGNAME",
        "npm_lifecycle_script",
        "npm_config_color",
        "npm_package_dependencies_emotion",
        "npm_config_proxy",
        "npm_config_package_lock",
        "npm_package_dependencies_stripchar",
        "VSCODE_IPC_HOOK",
        "NODE_REPL_HISTORY",
        "npm_config_package_lock_only",
        "npm_package_dependencies_react",
        "npm_config_save_optional",
        "NVM_BIN",
        "npm_config_ignore_scripts",
        "npm_config_user_agent",
        "npm_package_dependencies_react_burger_menu",
        "VSCODE_PID",
        "npm_config_cache_lock_wait",
        "npm_package_jest_moduleNameMapper____css_less__",
        "npm_config_production",
        "npm_package_dependencies_reset_css",
        "npm_config_send_metrics",
        "npm_config_save_bundle",
        "npm_package_dependencies_react_testing_library",
        "NODE_REPL_HISTORY_SIZE",
        "npm_config_umask",
        "npm_config_node_options",
        "npm_config_init_version",
        "npm_config_init_author_name",
        "npm_config_git",
        "npm_config_scope",
        "npm_package_devDependencies_serve",
        "npm_package_dependencies_raven_js",
        "SECURITYSESSIONID",
        "npm_config_unsafe_perm",
        "npm_config_tmp",
        "npm_config_onload_script",
        "npm_package_dependencies_react_router",
        "npm_node_execpath",
        "npm_config_prefix",
        "npm_config_link",
        "npm_package_devDependencies_onchange",
        "npm_package_dependencies_react_static",
        "npm_package_dependencies_babel_preset_react",
        "npm_package_dependencies_babel_polyfill",
        "npm_package_jest_rootDir",
        "NODE_ENV",
        "REACT_STATIC_ENV",
        "BABEL_ENV",
        "GOOGLE_ANALYTICS_TAG",
        "REACT_STATIC_PREFETCH_RATE",
        "REACT_STATIC_DISABLE_ROUTE_INFO_WARNING",
        "REACT_STATIC_DISABLE_ROUTE_PREFIXING",
        "REACT_STATIC_ROUTES_PATH",
        "REACT_STATIC_BASEPATH"
      ],
      "defaultValues": {
        "npm_config_save_dev": "",
        "npm_config_legacy_bundling": "",
        "npm_config_dry_run": "",
        "npm_package_dependencies_flow_typed": "^2.4.0",
        "VSCODE_NODE_CACHED_DATA_DIR_259":
          "/Users/logan/Library/Application Support/Code/CachedData/d0182c3417d225529c6d5ad24b7572815d0de9ac",
        "npm_config_viewer": "man",
        "npm_config_only": "",
        "npm_config_commit_hooks": "true",
        "npm_config_browser": "",
        "npm_package_gitHead": "79a09d35e2be47ec902348f4eadbc4954895a279",
        "npm_package_devDependencies_prettier": "^1.12.1",
        "npm_package_devDependencies_identity_obj_proxy": "^3.0.0",
        "npm_package_dependencies_redux": "^4.0.0",
        "npm_config_also": "",
        "npm_config_rollback": "true",
        "npm_package_dependencies_redux_immutable_state_invariant": "^2.1.0",
        "TERM_PROGRAM": "vscode",
        "NODE": "/Users/logan/.nvm/versions/node/v9.5.0/bin/node",
        "npm_config_usage": "",
        "LESS_TERMCAP_md": "\u001b[38;5;136m",
        "INIT_CWD": "/Users/logan/code/clean/seamonsterstudios",
        "npm_package_dependencies_moment": "^2.22.1",
        "npm_package_dependencies_hamburgers": "^0.9.3",
        "npm_package_dependencies_axios": "^0.16.2",
        "ANDROID_HOME": "/Users/logan/Library/Android/sdk",
        "NVM_CD_FLAGS": "",
        "npm_config_globalignorefile":
          "/Users/logan/.nvm/versions/node/v9.5.0/etc/npmignore",
        "npm_package_dependencies_eslint": "^4.19.1",
        "SHELL": "/bin/bash",
        "TERM": "xterm-256color",
        "npm_config_shell": "/bin/bash",
        "npm_config_maxsockets": "50",
        "npm_config_init_author_url": "",
        "npm_config__bit_registry": "https://node.bitsrc.io",
        "HISTSIZE": "32768",
        "npm_config_shrinkwrap": "true",
        "npm_config_parseable": "",
        "npm_config_metrics_registry": "https://registry.npmjs.org/",
        "TMPDIR": "/var/folders/v2/hsbrsg8d1nx_rt0nv7h4t_pc0000gn/T/",
        "npm_config_timing": "",
        "npm_config_init_license": "ISC",
        "Apple_PubSub_Socket_Render":
          "/private/tmp/com.apple.launchd.bqnQolgjkr/Render",
        "npm_config_if_present": "",
        "npm_package_devDependencies_concurrently": "^3.5.1",
        "npm_package_dependencies_react_spring": "^5.1.0",
        "npm_package_dependencies_dompurify": "^1.0.4",
        "npm_package_scripts_test_update": "jest -u",
        "TERM_PROGRAM_VERSION": "1.23.1",
        "npm_config_sign_git_tag": "",
        "npm_config_init_author_email": "",
        "npm_config_cache_max": "Infinity",
        "npm_package_dependencies_react_emotion": "^9.1.3",
        "npm_config_long": "",
        "npm_config_local_address": "",
        "npm_config_git_tag_version": "true",
        "npm_config_cert": "",
        "npm_package_dependencies_jest_emotion": "^9.1.3",
        "npm_config_registry": "https://registry.npmjs.org/",
        "npm_config_fetch_retries": "2",
        "npm_package_dependencies_react_dom": "^16.0.0",
        "npm_package_dependencies_babel_loader": "^7.1.4",
        "LC_ALL": "en_US.UTF-8",
        "npm_config_versions": "",
        "npm_config_message": "%s",
        "npm_config_key": "",
        "npm_package_readmeFilename": "README.md",
        "npm_package_dependencies_redux_devtools_extension": "^2.13.2",
        "npm_package_description":
          "This example includes: - Styled-Components - Image imports - File imports - Automatic Routing",
        "npm_package_dependencies_why_did_you_update": "^0.1.1",
        "USER": "logan",
        "HISTFILESIZE": "32768",
        "NVM_DIR": "/Users/logan/.nvm",
        "PYTHONIOENCODING": "UTF-8",
        "npm_package_license": "MIT",
        "npm_package_dependencies_emotion_theming": "^9.1.2",
        "COMMAND_MODE": "unix2003",
        "npm_config_globalconfig":
          "/Users/logan/.nvm/versions/node/v9.5.0/etc/npmrc",
        "npm_package_dependencies_graphcms_image": "^1.1.0-beta4",
        "npm_config_prefer_online": "",
        "npm_config_logs_max": "10",
        "npm_config_always_auth": "",
        "npm_package_dependencies_graphql_request": "^1.5.2",
        "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.H3xNJVbu5T/Listeners",
        "NODE_REPL_MODE": "sloppy",
        "__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
        "npm_execpath":
          "/Users/logan/.nvm/versions/node/v9.5.0/lib/node_modules/npm/bin/npm-cli.js",
        "npm_config_global_style": "",
        "npm_config_cache_lock_retries": "10",
        "npm_package_dependencies_babel_jest": "^22.4.3",
        "npm_package_prettier_trailingComma": "all",
        "npm_config_cafile": "",
        "npm_package_dependencies_react_redux": "^5.0.7",
        "npm_package_dependencies_ramda": "^0.25.0",
        "npm_config_heading": "npm",
        "npm_config_searchlimit": "20",
        "npm_config_read_only": "",
        "npm_config_offline": "",
        "npm_config_fetch_retry_mintimeout": "10000",
        "npm_config_json": "",
        "npm_config_access": "",
        "npm_config_argv":
          "{\"remain\":[],\"cooked\":[\"start\"],\"original\":[\"start\"]}",
        "PATH":
          "/Users/logan/.nvm/versions/node/v9.5.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/logan/code/clean/seamonsterstudios/node_modules/.bin:/Users/logan/.nvm/versions/node/v9.5.0/bin:/usr/local/sbin:/Users/logan/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/sbin:/Users/logan/bin:/Users/logan/.composer/vendor/bin:/Users/logan/Library/Android/sdk/tools:/Users/logan/Library/Android/sdk/platform-tools:/Applications/MAMP/Library/bin/:/Users/logan/.composer/vendor/bin:/Users/logan/Library/Android/sdk/tools:/Users/logan/Library/Android/sdk/platform-tools:/Users/logan/Library/Android/sdk/tools:/Users/logan/Library/Android/sdk/platform-tools:/Applications/MAMP/Library/bin/",
        "npm_config_allow_same_version": "",
        "npm_config_https_proxy": "",
        "npm_config_engine_strict": "",
        "npm_config_description": "true",
        "npm_package_dependencies__seamonster_studios_embed_svgs": "^2.1.3",
        "_":
          "/Users/logan/code/clean/seamonsterstudios/node_modules/.bin/react-static",
        "npm_config_userconfig": "/Users/logan/.npmrc",
        "npm_config_init_module": "/Users/logan/.npm-init.js",
        "npm_package_dependencies_redux_thunk": "^2.2.0",
        "npm_package_jest_moduleNameMapper____jpg_jpeg_png_gif_eot_otf_webp_svg_ttf_woff_woff2_mp4_webm_wav_mp3_m4a_aac_oga__":
          "src/__mocks__/fileMock.js",
        "npm_config_cidr": "",
        "npm_package_prettier_singleQuote": "true",
        "PWD": "/Users/logan/code/clean/seamonsterstudios",
        "npm_config_user": "501",
        "npm_config_node_version": "9.5.0",
        "npm_lifecycle_event": "start",
        "npm_package_dependencies_jest": "^22.4.3",
        "npm_package_jest_collectCoverageFrom_4": "!src/index.js",
        "EDITOR": "code",
        "npm_config_save": "true",
        "npm_config_ignore_prepublish": "",
        "npm_config_editor": "code",
        "npm_config_auth_type": "legacy",
        "npm_package_jest_collectCoverageFrom_3": "!src/App.js",
        "npm_package_name": "seamonsterstudios",
        "LANG": "en_US.UTF-8",
        "npm_config_tag": "latest",
        "npm_config_script_shell": "",
        "npm_package_dependencies_string_hash": "^1.1.3",
        "npm_package_dependencies_eslint_plugin_babel": "^5.1.0",
        "npm_package_jest_collectCoverageFrom_2": "!src/styles/**",
        "npm_config_progress": "true",
        "npm_config_global": "",
        "npm_package_jest_collectCoverageFrom_1": "!**/__snapshots__/**",
        "npm_package_scripts_build": "react-static build",
        "npm_package_scripts_start_all":
          "concurrently --kill-others-on-fail \"yarn format:watch\" \"yarn start\"",
        "npm_package_scripts_start": "react-static start",
        "npm_config_searchstaleness": "900",
        "npm_config_optional": "true",
        "npm_config_ham_it_up": "",
        "npm_package_devDependencies_faker": "^4.1.0",
        "npm_package_dependencies_babel_preset_env": "^1.6.1",
        "npm_package_dependencies_babel_core": "^6.26.3",
        "npm_package_jest_collectCoverageFrom_0": "src/**/*.js",
        "XPC_FLAGS": "0x0",
        "npm_config_save_prod": "",
        "npm_config_force": "",
        "npm_config_bin_links": "true",
        "npm_package_devDependencies_eslint_config_react_tools": "^1.2.5",
        "npm_package_dependencies_eslint_plugin_react": "^7.7.0",
        "npm_config_searchopts": "",
        "npm_config_node_gyp":
          "/Users/logan/.nvm/versions/node/v9.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
        "npm_config_depth": "Infinity",
        "npm_package_dependencies_emotion_server": "^9.1.3",
        "npm_package_main": "index.js",
        "npm_config_sso_poll_frequency": "500",
        "npm_config_rebuild_bundle": "true",
        "npm_package_scripts_sp": "node ./src/utils-tmp/scratchpad.js",
        "npm_package_version": "4.0.0",
        "XPC_SERVICE_NAME": "0",
        "HISTCONTROL": "ignoreboth",
        "npm_config_unicode": "true",
        "HOME": "/Users/logan",
        "MANPAGER": "less -X",
        "SHLVL": "3",
        "npm_config_fetch_retry_maxtimeout": "60000",
        "npm_package_scripts_test": "jest --watch",
        "npm_config_tag_version_prefix": "v",
        "npm_config_strict_ssl": "true",
        "npm_config_sso_type": "oauth",
        "npm_config_scripts_prepend_node_path": "warn-only",
        "npm_config_save_prefix": "^",
        "npm_config_loglevel": "notice",
        "npm_config_ca": "",
        "npm_package_devDependencies_lodash": "^4.17.10",
        "npm_package_dependencies_dotenv": "^5.0.1",
        "npm_package_scripts_serve": "serve dist -p 3000",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{}}",
        "npm_config_save_exact": "",
        "npm_config_group": "20",
        "npm_config_fetch_retry_factor": "10",
        "npm_config_dev": "",
        "npm_config_version": "",
        "npm_config_prefer_offline": "",
        "npm_config_cache_lock_stale": "60000",
        "npm_package_dependencies_eslint_plugin_jest": "^21.15.1",
        "npm_package_dependencies_babel_eslint": "^8.2.3",
        "npm_package_prettier_semi": "false",
        "npm_config_otp": "",
        "npm_config_cache_min": "10",
        "npm_config_searchexclude": "",
        "npm_config_cache": "/Users/logan/.npm",
        "npm_package_scripts_test_coverage": "jest --coverage",
        "npm_package_scripts_format_watch":
          "onchange 'src/**/*.js' -- prettier --write {{changed}}",
        "npm_package_scripts_format": "prettier --write 'src/**/*.js'",
        "LOGNAME": "logan",
        "npm_lifecycle_script": "react-static start",
        "npm_config_color": "true",
        "npm_package_dependencies_emotion": "^9.1.3",
        "npm_config_proxy": "",
        "npm_config_package_lock": "true",
        "npm_package_dependencies_stripchar": "^1.2.1",
        "VSCODE_IPC_HOOK":
          "/Users/logan/Library/Application Support/Code/1.23.1-main.sock",
        "NODE_REPL_HISTORY": "/Users/logan/.node_history",
        "npm_config_package_lock_only": "",
        "npm_package_dependencies_react": "^16.0.0",
        "npm_config_save_optional": "",
        "NVM_BIN": "/Users/logan/.nvm/versions/node/v9.5.0/bin",
        "npm_config_ignore_scripts": "",
        "npm_config_user_agent": "npm/5.6.0 node/v9.5.0 darwin x64",
        "npm_package_dependencies_react_burger_menu": "^2.4.4",
        "VSCODE_PID": "259",
        "npm_config_cache_lock_wait": "10000",
        "npm_package_jest_moduleNameMapper____css_less__": "identity-obj-proxy",
        "npm_config_production": "",
        "npm_package_dependencies_reset_css": "^3.0.0",
        "npm_config_send_metrics": "",
        "npm_config_save_bundle": "",
        "npm_package_dependencies_react_testing_library": "^3.0.2",
        "NODE_REPL_HISTORY_SIZE": "32768",
        "npm_config_umask": "0022",
        "npm_config_node_options": "",
        "npm_config_init_version": "1.0.0",
        "npm_config_init_author_name": "",
        "npm_config_git": "git",
        "npm_config_scope": "",
        "npm_package_devDependencies_serve": "^6.1.0",
        "npm_package_dependencies_raven_js": "^3.24.2",
        "SECURITYSESSIONID": "186a7",
        "npm_config_unsafe_perm": "true",
        "npm_config_tmp": "/var/folders/v2/hsbrsg8d1nx_rt0nv7h4t_pc0000gn/T",
        "npm_config_onload_script": "",
        "npm_package_dependencies_react_router": "^4.2.0",
        "npm_node_execpath": "/Users/logan/.nvm/versions/node/v9.5.0/bin/node",
        "npm_config_prefix": "/Users/logan/.nvm/versions/node/v9.5.0",
        "npm_config_link": "",
        "npm_package_devDependencies_onchange": "^4.0.0",
        "npm_package_dependencies_react_static": "^5.8.6",
        "npm_package_dependencies_babel_preset_react": "^6.24.1",
        "npm_package_dependencies_babel_polyfill": "^6.26.0",
        "npm_package_jest_rootDir": "src",
        "NODE_ENV": "development",
        "REACT_STATIC_ENV": "development",
        "BABEL_ENV": "development",
        "GOOGLE_ANALYTICS_TAG": "",
        "REACT_STATIC_PREFETCH_RATE": "3",
        "REACT_STATIC_DISABLE_ROUTE_INFO_WARNING": "false",
        "REACT_STATIC_DISABLE_ROUTE_PREFIXING": "false",
        "REACT_STATIC_ROUTES_PATH":
          "/Users/logan/code/clean/seamonsterstudios/tmp/dev-server/react-static-routes.js",
        "REACT_STATIC_BASEPATH": ""
      }
    },
    {
      "options": {
        "template":
          "!!raw-loader!/Users/logan/code/clean/seamonsterstudios/tmp/dev-server/index.html",
        "filename": "index.html",
        "hash": false,
        "inject": true,
        "compile": true,
        "favicon": false,
        "minify": false,
        "cache": true,
        "showErrors": true,
        "chunks": "all",
        "excludeChunks": [],
        "title": "Webpack App",
        "xhtml": false
      }
    },
    { "options": {}, "fullBuildTimeout": 200, "requestTimeout": 10000 },
    {},
    { "options": {} },
    { "options": {}, "pathCache": {}, "fsOperations": 0, "primed": false }
  ],
  "devtool": "eval-source-map"
}
painedpineapple commented 6 years ago

Hey @itaymendel, just checking to see if you've made any headway on figuring out what's causing this issue?

itaymendel commented 6 years ago

hi, i was unable to resolve it yet. right now we're trying to stabilize Bit's next release. one of the major parts that had major refactoring is the extension/environment system, so my plan is that once Bit is stable enough, i'll run tests on the specific issue with the new version.

I should have some sort of answer by Sunday. Sorry for not updating the issue.

itaymendel commented 6 years ago

hi @thislogancall I tested it with the latest master build of Bit on the backend, and the issue still persists. after digging deeper, it seems that the issue is that for some reason the backend bundling service does not install peer dependencies properly, which causes the issue. After the next release of Bit (hopefully today), we plan on improving the rendering feature, I will prioritize this issue to be on the top of the list, and I trust it will be fixed very soon.

itaymendel commented 6 years ago

closing this issue, as it's relevant to bitsrc, not bit. anyway, we'll handle peerdeps better with the release of the new component renderer.