Errors on first attempt of using `spin watch`
Closed this issue · 1 comments
lnmunhoz commented
I've got a few errors while trying to use this module. Here's how was the experience:
- I've installed spinjs as a dev dependency.
- Added to my package.json:
{
"spin": "webpack:babel:apollo:web:styled-components:react-hot-loader",
}
- Then I ran
spin watch
, it could not find theses modules:
- webpack-manifest-plugin
- webpack-virtual-modules
-
I installed the modules manually.
-
I've tried to run
spin watch
again. -
Got the following error:
appDll-webpack debug Generating vendor_app DLL bundle with modules:
["@envisioning/authed","@envisioning/design-library","apollo-boost","apollo-cache-inmemory","apollo-client","apollo-link","apollo-link-error","apollo-link-http","apollo-link-state","apollo-link-state-fragment","axios","babel-core","babel-preset-react","downshift","formik","fraql","graphql","graphql-anywhere","graphql-tag","halogenium","jwt-decode","lodash.difference","polished","prop-types","ramda","react","react-apollo","react-dom","react-notification-system","react-router","react-router-dom","react-router-last-location","react-router-prop-types","reakit","recompose","styled-components","styled-css-grid","styled-system","uuidv4","webpack-dev-server/client"]
appDll-webpack error ModuleNotFoundError: Module not found: Error: Can't resolve 'module' in '/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/babel-core/lib/helpers'
at factory.create (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compilation.js:796:10)
at factory (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/NormalModuleFactory.js:397:22)
at resolver (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
at asyncLib.parallel (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
at /Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/neo-async/async.js:2817:7
at /Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/neo-async/async.js:6783:13
at normalResolver.resolve (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
at doResolve (/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
at hook.callAsync (/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:15:1)
spin error Error: Build error
at webpackReporter (/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/spinjs/src/executor.ts:107:11)
at reporter (/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/spinjs/src/executor.ts:711:50)
at finalCallback (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compiler.js:210:39)
at onCompiled (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compiler.js:218:20)
at hooks.make.callAsync.err (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compiler.js:543:21)
at _err0 (eval at create (/Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:9:1)
at _addModuleChain (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compilation.js:1053:13)
at processModuleDependencies.err (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compilation.js:979:25)
at asyncLib.forEach.err (/Users/lnmunhoz/workspaces/Envisioning/frontend/apps/platform/node_modules/webpack/lib/Compilation.js:893:13)
at /Users/lnmunhoz/workspaces/Envisioning/frontend/node_modules/neo-async/async.js:2817:7
I don't know how to proceed now... Any help?
My node version is 9.11.2 if that helps.
Thanks!
larixer commented
@lnmunhoz spinjs
tries to add all your package.json -> dependencies
into Webpack DLL to speed up incremental builds. Looks like one of your dependencies there uses module
Node package, which is available only on Node platform, but not inside web browser. Try to figure out which dependency does that by removing part of dependencies from package.json -> dependencies