codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.11k stars 2.29k forks source link

'yarn start' throw errors #827

Closed hackerxian closed 6 years ago

hackerxian commented 6 years ago

šŸ› bug report

Description of the problem

I use yarn start, now throw this error

app: Error in ../common/utils/badges/patron-info.js
app: Module not found: Error: Can't resolve 'react-hot-loader' in '/Users/xxx/Projects/codesandbox-client/packages/common/utils/badges'
app:  @ ../common/utils/badges/patron-info.js 4:20-47 47:23-50 49:20-47
app:  @ ./src/app/pages/Patron/PricingModal/PricingChoice/index.js
app:  @ ./src/app/pages/Patron/PricingModal/index.js
app:  @ ./src/app/pages/Patron/index.js
app:  @ ./src/app/pages/index.js
app:  @ ./src/app/index.js
app:  @ multi react-hot-loader/patch webpack-dev-server/client?/ webpack/hot/only-dev-server ./config/polyfills.js ./src/app/index.js
app: Error in ../common/utils/badges/index.js
app: Module not found: Error: Can't resolve 'react-hot-loader' in '/Users/xxx/Projects/codesandbox-client/packages/common/utils/badges'
app:  @ ../common/utils/badges/index.js 2:20-47 23:23-50 25:20-47
app:  @ ../common/utils/badges/Badge.js
app:  @ ./src/app/pages/common/Modals/PreferencesModal/Badges/index.js
app:  @ ./src/app/pages/common/Modals/PreferencesModal/index.js
app:  @ ./src/app/pages/common/Modals/index.js
app:  @ ./src/app/pages/index.js
app:  @ ./src/app/index.js
app:  @ multi react-hot-loader/patch webpack-dev-server/client?/ webpack/hot/only-dev-server ./config/polyfills.js ./src/app/index.js
app: Error in ../common/utils/badges/PatronBadge.js
app: Module not found: Error: Can't resolve 'react-hot-loader' in '/Users/xxx/Projects/codesandbox-client/packages/common/utils/badges'
app:  @ ../common/utils/badges/PatronBadge.js 5:20-47 30:23-50 32:20-47
app:  @ ./src/app/pages/common/UserMenu/Menu/index.js
app:  @ ./src/app/pages/common/UserMenu/index.js
app:  @ ./src/app/pages/common/Navigation/index.js
app:  @ ./src/app/pages/NewSandbox/index.js
app:  @ ./src/app/pages/index.js
app:  @ ./src/app/index.js
app:  @ multi react-hot-loader/patch webpack-dev-server/client?/ webpack/hot/only-dev-server ./config/polyfills.js ./src/app/index.js

I can not see use 'react-hot-loader' in codesandbox-client/packages/common/utils/badges

Your Environment

Software Name/Version
yarn 1.6.0
Node v8.11.1
Operating System Mac
lbogdan commented 6 years ago

Hey, @dickeyxian ! Can you please share the whole output, including the one for yarn?

hackerxian commented 6 years ago

@lbogdan

$ yarn build:deps && lerna run start --scope app --stream
$ lerna run build:dev --scope codesandbox-api --scope codesandbox-browserfs
lerna info version 2.9.0
lerna info versioning independent
lerna info scope [ 'codesandbox-api', 'codesandbox-browserfs' ]

> codesandbox-api@0.0.18 build:dev /Users/xianda/Projects/codesandbox-client/packages/codesandbox-api
> tsc && rollup -c

> codesandbox-browserfs@2.0.1 build:dev /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> npm-run-all --parallel build:tsc build:scripts --sequential build:rollup --parallel build:webpack build:webpack-release --sequential script:make_dist

> codesandbox-browserfs@2.0.1 build:tsc /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> tsc -p src

> codesandbox-browserfs@2.0.1 build:scripts /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> tsc -p scripts

> codesandbox-browserfs@2.0.1 build:rollup /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> rollup -c src/rollup.config.js

> codesandbox-browserfs@2.0.1 build:webpack /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> webpack --config src/webpack.config.js

> codesandbox-browserfs@2.0.1 build:webpack-release /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> webpack -p --config src/webpack.config.js

Hash: 14006aa4961c0288b2bd
Version: webpack 3.4.1
Time: 793ms
                    Asset    Size  Chunks                    Chunk Names
    ../build/browserfs.js  364 kB       0  [emitted]  [big]  main
../build/browserfs.js.map  595 kB       0  [emitted]         main
   [5] (webpack)/buildin/global.js 509 bytes {0} [built]
   [8] ./build/temp/library/webpack/BFSBuffer.js 43 bytes {0} [built]
  [18] ./build/temp/library/rollup/browserfs.rollup.js 181 kB {0} [built]
    + 30 hidden modules
Hash: fba82fe29acb419b7dc4
Version: webpack 3.4.1
Time: 2539ms
                        Asset    Size  Chunks             Chunk Names
    ../build/browserfs.min.js  127 kB       0  [emitted]  main
../build/browserfs.min.js.map  989 kB       0  [emitted]  main
   [5] (webpack)/buildin/global.js 509 bytes {0} [built]
   [8] ./build/temp/library/webpack/BFSBuffer.js 43 bytes {0} [built]
  [18] ./build/temp/library/rollup/browserfs.rollup.js 181 kB {0} [built]
    + 30 hidden modules

> codesandbox-browserfs@2.0.1 script:make_dist /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
> node build/scripts/make_dist.js
lerna success run Ran npm script 'build:dev' in packages:
lerna success - codesandbox-api
lerna success - codesandbox-browserfs
lerna info version 2.9.0
lerna info versioning independent
lerna info scope app
app: > app@0.1.1 start /Users/xianda/Projects/codesandbox-client/packages/app
app: > cross-env LOCAL_SERVER=1 node scripts/start.js
app: Happy[1]: Version: 4.0.1. Threads: 3
app: [HPM] Proxy created: /  ->  https://codesandbox.io
app: Happy[1]: All set; signaling webpack to proceed.
app:
Failed to compile.
app: Error in /Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/abbreviation/dist/abbreviation.es.js
app: Module not found: Error: Can't resolve 'react-hot-loader' in '/Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/abbreviation/dist'
app:  @ /Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/abbreviation/dist/abbreviation.es.js 4:19-46 366:22-49 368:19-46
app:  @ /Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/expand-abbreviation/dist/expand.es.js
app:  @ ./src/app/components/CodeEditor/Monaco/enable-emmet.js
app:  @ ./src/app/components/CodeEditor/Monaco/index.js
app:  @ ./src/app/components/CodeEditor/index.js
app:  @ ./src/embed/components/Content/index.js
app:  @ ./src/embed/components/App/index.js
app:  @ ./src/embed/index.js
app:  @ multi react-hot-loader/patch webpack-dev-server/client?/ webpack/hot/only-dev-server ./config/polyfills.js ./src/embed/index.js
app: Error in /Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/codemirror-plugin/dist/emmet-codemirror-plugin.es.js
app: Module not found: Error: Can't resolve 'react-hot-loader' in '/Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/codemirror-plugin/dist'
app:  @ /Users/xianda/Projects/codesandbox-client/node_modules/@emmetio/codemirror-plugin/dist/emmet-codemirror-plugin.es.js 10:19-46 1436:22-49 1438:19-46
app:  @ ./src/app/utils/codemirror/index.js
app:  @ ./src/app/components/CodeEditor/CodeMirror/index.js
app:  @ ./src/app/components/CodeEditor/index.js
app:  @ ./src/embed/components/Content/index.js
app:  @ ./src/embed/components/App/index.js
app:  @ ./src/embed/index.js
lbogdan commented 6 years ago

Ok, try this: do a clean git clone, run yarn inside of it, and paste the output.

hackerxian commented 6 years ago

@lbogdan By the way, I removed 'packages/homepage' in package.json, because install dependencies - gatsby image compile too slow. this will be impact??

hackerxian commented 6 years ago

removed 'packages/homepage' in package.json, and run yarn

yarn install v1.6.0
[1/4] šŸ”  Resolving packages...
[2/4] šŸšš  Fetching packages...
warning Pattern ["resolve@lbogdan/resolve"] is trying to unpack in the same destination "/Users/xianda/Library/Caches/Yarn/v1/npm-resolve-1.5.0" as pattern ["resolve@^1.2.0","resolve@^1.2.0","resolve@^1.4.0","resolve@^1.3.2","resolve@^1.5.0","resolve@^1.3.2"]. This could result in non-deterministic behavior, skipping.
[3/4] šŸ”—  Linking dependencies...
warning " > eslint-config-airbnb@15.1.0" has unmet peer dependency "eslint@^3.19.0 || ^4.3.0".
warning "eslint-config-airbnb > eslint-config-airbnb-base@11.3.2" has unmet peer dependency "eslint@^3.19.0 || ^4.5.0".
warning " > eslint-config-prettier@2.9.0" has unmet peer dependency "eslint@>=3.14.1".
warning " > eslint-import-resolver-webpack@0.8.4" has unmet peer dependency "webpack@>=1.11.0".
warning " > eslint-loader@1.9.0" has unmet peer dependency "eslint@>=1.6.0 <5.0.0".
warning " > eslint-plugin-flowtype@2.45.0" has unmet peer dependency "eslint@>=2.0.0".
warning " > eslint-plugin-import@2.8.0" has unmet peer dependency "eslint@2.x - 4.x".
warning " > eslint-plugin-jsx-a11y@5.1.1" has unmet peer dependency "eslint@^2.10.2 || ^3 || ^4".
warning " > eslint-plugin-react@7.4.0" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > react-smooshpack@0.0.33" has unmet peer dependency "react@^16.0.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > downshift@1.31.12" has unmet peer dependency "prop-types@>=15".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > eslint-config-react-app@1.0.5" has incorrect peer dependency "babel-eslint@^7.2.3".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > eslint-config-react-app@1.0.5" has incorrect peer dependency "eslint@^3.19.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > react-addons-css-transition-group@15.6.2" has incorrect peer dependency "react@^15.4.2".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > extract-text-webpack-plugin@2.1.2" has incorrect peer dependency "webpack@^2.2.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > common > react-input-autosize@2.2.1" has unmet peer dependency "react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > common > react-textarea-autosize@6.1.0" has unmet peer dependency "react@>=0.14.0 <17.0.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > react-smooshpack > @storybook/addon-knobs@3.3.15" has unmet peer dependency "@storybook/addons@^3.3.0".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > console-feed > emotion-theming@9.1.2" has unmet peer dependency "prop-types@>= 15".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > react-icons > react-icon-base@2.1.0" has unmet peer dependency "prop-types@*".
warning "workspace-aggregator-599b0dd3-4e09-442f-bd6c-c571d5f4a7b5 > app > console-feed > react-emotion > create-emotion-styled@9.1.2" has unmet peer dependency "prop-types@>= 15".
[4/4] šŸ“ƒ  Building fresh packages...
success Saved lockfile.
$ lerna run install-dependencies --scope codesandbox-browserfs --stream
lerna info version 2.9.0
lerna info versioning independent
lerna info scope codesandbox-browserfs
codesandbox-browserfs: > codesandbox-browserfs@2.0.1 install-dependencies /Users/xianda/Projects/codesandbox-client/standalone-packages/codesandbox-browserfs
codesandbox-browserfs: > yarn install
codesandbox-browserfs: yarn install v1.6.0
codesandbox-browserfs: [1/5] Validating package.json...
codesandbox-browserfs: [2/5] Resolving packages...
codesandbox-browserfs: [3/5] Fetching packages...
codesandbox-browserfs: [4/5] Linking dependencies...
codesandbox-browserfs: [5/5] Building fresh packages...
codesandbox-browserfs: Done in 7.80s.
lerna success run Ran npm script 'install-dependencies' in packages:
lerna success - codesandbox-browserfs
āœØ  Done in 122.34s.
lbogdan commented 6 years ago

I did the same (clean git clone, remove packages/homepage, yarn, yarn start), and I got the same error as you, so removing homepage breaks the app.

CompuIves commented 6 years ago

I'm closing this one right now because of inactivity, I think removing the homepage could change the dependency install locations which causes it to crash.