milesj / interweave

🌀 React library to safely render HTML, filter attributes, autowrap text with matchers, render emoji characters, and much more.
https://interweave.dev
MIT License
1.1k stars 38 forks source link

Issue with build process #70

Closed robertkraig closed 5 years ago

robertkraig commented 5 years ago

Trying to leverage a local cache via a echo "registry=http://<my-local-registry>" >> ~/.npmrc which just caches all packages. To enforce this, I had to remove the yarn.lock. This in turn gets updated. So when you remove the yarn.lock, and run yarn install --verbose everything installs correctly, but I end up with:

robert_kraig ~/projects/interweave task/community-remerge-updates $ npm run build                                                                                                                                     

> interweave-root@ build /Users/robert_kraig/interweave-community
> beemo run-script build --workspaces=*

Missing driver. Attempted import in order: @beemo/driver-typescript, beemo-driver-typescript
    at ModuleLoader.importModule (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/ModuleLoader.js:67:19)
    at ModuleLoader.loadModule (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/ModuleLoader.js:135:25)
    at modules.map.module (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/ModuleLoader.js:146:43)
    at Array.map (<anonymous>)
    at ModuleLoader.loadModules (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/ModuleLoader.js:146:24)
    at Object.keys.forEach.type (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/Tool.js:415:36)
    at Array.forEach (<anonymous>)
    at Beemo.loadPlugins (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/Tool.js:412:39)
    at Beemo.initialize (/Users/robert_kraig/projects/interweave/node_modules/@boost/core/lib/Tool.js:287:14)
    at new Beemo (/Users/robert_kraig/projects/interweave/node_modules/@beemo/core/lib/Beemo.js:67:14)

If I don't update the yarn.lock everything is fine. @milesj some assistance would be appreciated.

milesj commented 5 years ago

Which @beemo/driver-typescript is being installed on the file system?

robertkraig commented 5 years ago

@milesj how do I know this? @beemo/driver-typescript on the system? node_modules folder? or is this a global thing that should be installed?

milesj commented 5 years ago

Just check node_modules/@beemo/driver-typescript/package.json. Can you also check @boost/core?

robertkraig commented 5 years ago
robert_kraig ~/interweave-community/node_modules/@beemo  master $ tree -d                                                                                                                                                                                                     
.
├── cli
│   ├── bin
│   ├── lib
│   └── node_modules
│       ├── cliui
│       ├── get-caller-file
│       ├── semver
│       │   └── bin
│       ├── string-width
│       ├── wrap-ansi
│       └── yargs
│           ├── lib
│           └── locales
├── core
│   ├── lib
│   │   ├── contexts
│   │   ├── routines
│   │   │   ├── driver
│   │   │   └── script
│   │   ├── streams
│   │   └── utils
│   ├── node_modules
│   │   ├── @types
│   │   │   └── yargs
│   │   ├── braces
│   │   │   └── lib
│   │   ├── cliui
│   │   ├── execa
│   │   │   └── lib
│   │   ├── fast-glob
│   │   │   └── out
│   │   │       ├── managers
│   │   │       ├── providers
│   │   │       │   ├── filters
│   │   │       │   └── transformers
│   │   │       ├── readers
│   │   │       ├── types
│   │   │       └── utils
│   │   ├── fill-range
│   │   ├── fs-extra
│   │   │   └── lib
│   │   │       ├── copy
│   │   │       ├── copy-sync
│   │   │       ├── empty
│   │   │       ├── ensure
│   │   │       ├── fs
│   │   │       ├── json
│   │   │       ├── mkdirs
│   │   │       ├── move
│   │   │       ├── move-sync
│   │   │       ├── output
│   │   │       ├── path-exists
│   │   │       ├── remove
│   │   │       └── util
│   │   ├── get-caller-file
│   │   ├── get-stream
│   │   ├── glob-parent
│   │   ├── is-number
│   │   ├── is-stream
│   │   ├── micromatch
│   │   ├── npm-run-path
│   │   ├── p-finally
│   │   ├── path-key
│   │   ├── string-width
│   │   ├── to-regex-range
│   │   ├── wrap-ansi
│   │   └── yargs
│   │       ├── lib
│   │       └── locales
│   └── resources
│       └── en
├── dependency-graph
│   └── lib
├── driver-babel
│   ├── lib
│   └── node_modules
├── driver-eslint
│   ├── lib
│   └── node_modules
├── driver-jest
│   ├── lib
│   └── node_modules
└── driver-prettier
    ├── lib
    └── node_modules

85 directories
milesj commented 5 years ago

@robertkraig I need the version numbers.

robertkraig commented 5 years ago

I didn't see a driver-typescript in the


cat node_modules/@beemo/driver-typescript/package.json
cat: node_modules/@beemo/driver-typescript/package.json: No such file or directory

cat node_modules/@boost/core/package.json | jq '.version'
"1.12.2"````
milesj commented 5 years ago

@robertkraig That's super odd. What Yarn version are you using?

robertkraig commented 5 years ago
yarn --version 
1.16.0
milesj commented 5 years ago

@robertkraig Not really sure. If you wipe yarn.lock and node modules, and a re-install doesn't bring the dep back on the file system, I really don't have an answer. This sounds like a Yarn problem.

jfugett commented 5 years ago

@milesj @robertkraig it appears that by default yarn is installing @beemo/driver-typescript@1.1.0 instead of @beemo/driver-typescript@^1.0.0-alpha.4 manually installing @beemo/driver-typescript@^1.0.0-alpha.4 as a dev dependency will get you moving in the interim.

milesj commented 5 years ago

@jfugett It's weird that that would cause it, semver it's a valid range. Maybe Yarn doesn't respect this.

Screen Shot 2019-07-15 at 3 10 40 PM
jfugett commented 5 years ago

@miles yeah it appears to ignore the prerelease for version matching, not sure if it's intentional on yarns end or not, but from what I can tell there's no way to create a prerelease version with yarn directly at all, so it's probably discarding the alpha for range matching.

milesj commented 5 years ago

I'll do a dependency audit later today and bump all of these. Should help resolve this issue.

milesj commented 5 years ago

@robertkraig I updated deps. Can you rebase and try again?

robertkraig commented 5 years ago

@milesj looks like the standard build works w/ my echo "registry=http://<my-local-registry>" >> ~/.npmrc cache now. 🥇 👍

rm yarn.lock && yarn install && yarn run build worked like a charm now.

milesj commented 5 years ago

Awesome!