nvm use before you start
Execute this command and follow instructions:
# You'll be asked for a package name in kebab case
# --force is to override flow-configurations
yarn generate:packageThen you need to add your package name in the following files:
.circleci/config.ymlin the cache saved paths.storybook/config.js, add those two lines:req = require.context(`../packages/{YOUR_PACKAGE_NAME}/src`, true, /.stories.js$/); importAll(req);
Finally, change the port of the watch server in webpack.config.js (watcherConfiguration)
const watcherConfiguration = {
//...
devServer: {
//...
port: 9005,
},
};
# When running yarn
error An unexpected error occurred: "ENOENT: no such file or directory
# Fix : clean cache
yarn cache clean
# Optional : update your yarn version
npm uninstall yarn -g
npm install yarn -g
# When running `yarn start` in your new package
<span style="color:red">Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.</span>
# Fix : update your yarn version
nvm use
npm uninstall yarn -g
npm install yarn -g
# When running tests in a package you just renamed, if you got an error about 'styled-components'
# Fix : reinstall the package (it will create symlinks in node_modules for dependencies)
yarn (in root folder of shared-components)
Now follow development documentation
