stealjs / steal

Gets JavaScript
https://stealjs.com
MIT License
1.37k stars 521 forks source link

Packages not installed in top level package aren't accessible in production build #816

Closed green3g closed 8 years ago

green3g commented 8 years ago

I'm encountering an issue when moving to steal.production. Running on windows, with steal@beta and steal-tools@beta

I have a node dependency package, which has another dependency on date-selector. The file is being imported using the es6 syntax:

import dateSelector from 'date-selector';

During development, this file is imported correctly (crud/node_modules/date-selectorand when it is built, the log shows that it is inserted into a bundle correctly along with its dependencies onunderscoreandmoment`.

During production though, steal is requesting date-selector from `

This is also happening with the following other files:

This is using the default node_modules/steal/steal.production.js without bundling assets:

//build.js
var stealTools = require("steal-tools");
var path = require("path");

stealTools.build({
    config: path.join(__dirname,"package.json!npm")
},{
    // bundleSteal: true,
    // bundleAssets: true,
    // sourceMaps: true
});

image

matthewp commented 8 years ago

Can you share what the package is that depends on date-selector? Otherwise I can't easily debug what is going on.

green3g commented 8 years ago

Yes sir, I don't have it on npm yet but here's the repo. https://github.com/roemhildtg/can-crud

matthewp commented 8 years ago

Thanks, i'm actually getting an error just building, just requiring can-crud. Investigating that first.

green3g commented 8 years ago

Interesting, I'm not having trouble building any more.. what is the error message? I have it set up like this in package.json:

  "dependencies": {
    "bootstrap": "^3.3.7",
    "can": "^2.3.x",
    "can-connect": "^0.5.x",
    "can-crud": "git+https://github.com/roemhildtg/can-crud.git"
......
pYr0x commented 8 years ago

So we can close this?

green3g commented 8 years ago

Well I'm not getting build errors, the problem is still occurring.

pYr0x commented 8 years ago

can you provide a simple app (accessible through github) that demostrate this issue, so we can solve it?

green3g commented 8 years ago

Okay, I tried creating a simple example, but I'm unable reproduce the issue. The original problem consistently occurs in https://github.com/roemhildtg/can-crud-app but it must be something I'm doing, not an issue with steal.