Quantcast

Dojo build via Node fails with non-standard util folder path

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Dojo build via Node fails with non-standard util folder path

sindilevich
Hello,

Dojo 1.12.1.

Dojo build via Node fails with non-standard util folder path. It can happen, when using npm to manage project's dependencies. With npm you would install dojo/util as npm install dojo-util, which places the util at the node_modules/dojo-util folder.

Building Dojo with Node in such a case, results in an error: Error: ENOENT: no such file or directory, open '/Users/XYZ/Projects/dojo-boilerplate/node_modules/util/build/main.js'.

I can fix the build, by manually editing dojo/dojo.js@L2012-2018, replacing the build and doh package configurations with:

{
        name:'build',
        location:'../dojo-util/build'
},{
        name:'doh',
        location:'../dojo-util/doh'
}


I'd prefer a configuration-based way to re-route the util folder to a non-standard location.

Your help is much appreciated!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dojo build via Node fails with non-standard util folder path

dylanks
The challenge we've had that has led to this is that npm does not allow
name aliasing, so unless you're the first package with a name, you
cannot be that package.

npm does support scoped packages, e.g. @dojo/package , but this doesn't
work with bower. So for util, themes, and dstore, we're left with dojo-*.

The configuration based way to reroute is to set the package
configuration using a configuration files rather than modifying dojo.js

You may specify a package configuration both within the loading of your
app, as well as within your build profile, under the packages setting.

Regards,
-Dylan

on 2/11/17, 16:04 (GMT-07:00) sindilevich said the following:

> Hello,
>
> Dojo 1.12.1.
>
> Dojo build via Node fails with non-standard *util* folder path. It can
> happen, when using *npm* to manage project's dependencies. With npm you
> would install *dojo/util* as /npm install dojo-util/, which places the util
> at the *node_modules/dojo-util* folder.
>
> Building Dojo with Node in such a case, results in an error: *Error: ENOENT:
> no such file or directory, open
> '/Users/XYZ/Projects/dojo-boilerplate/node_modules/util/build/main.js'*.
>
> I can fix the build, by manually editing *dojo/dojo.js@L2012-2018*,
> replacing the /build/ and /doh/ package configurations with:
> *
> {
> name:'build',
> location:'../dojo-util/build'
> },{
> name:'doh',
> location:'../dojo-util/doh'
> }
> *
>
> I'd prefer a configuration-based way to re-route the util folder to a
> non-standard location.
>
> Your help is much appreciated!
>
>
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-build-via-Node-fails-with-non-standard-util-folder-path-tp4007131.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Loading...