stealjs / steal-tools

Build easy. Load fast.
https://stealjs.com/docs/steal-tools.html
MIT License
67 stars 23 forks source link

Build not copying "events" from node_modules #1085

Closed leoj3n closed 5 years ago

leoj3n commented 5 years ago

It would appear the events package is missing from the bundle. Here is npm ls events:

bitcentivez-client@0.0.1 /Users/leoj/src/bitcentivez/client
├─┬ @feathersjs/feathers@3.2.3
│ └── events@3.0.0
├─┬ can@5.15.1
│ └─┬ can-connect-feathers@5.0.0
│   └─┬ feathers-authentication-popups@0.1.2
│     └── events@1.1.1
├─┬ steal@2.1.6
│ └── events@1.1.1
└─┬ testee@0.8.1
  └─┬ feathers@2.2.4
    └── events@1.1.1

The error manifests like this within the frontend app:

image

If I update my build npm run-script to manually copy the events package from node_modules, the frontend app loads without errors because it can now find the file it was looking for:

Original build script:

    "build": "rm -rf ./prod && mkdir ./prod && node build && mv ./dist ./prod && cp ./package.json ./favicon.ico ./prod",

Updated build script:

    "build": "rm -rf ./prod && mkdir ./prod && node build && cp -r ./node_modules/events ./dist/node_modules && mv ./dist ./prod && cp ./package.json ./favicon.ico ./prod",

image

There are no other missing scripts causing errors like this, so I wonder if it's something specifically unique to the events package (perhaps its package.json is not handled properly).

chasenlehara commented 5 years ago

I wonder if this is related to https://github.com/stealjs/steal/issues/1490

@leoj3n Could you try the latest StealJS and check if this is still an issue please?

leoj3n commented 5 years ago

@chasenlehara Thanks, this does seem to no longer be an issue. Will reopen if anything changes.