Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: No fs #110

Open
cocheok opened this issue Oct 8, 2015 · 2 comments
Open

Uncaught Error: No fs #110

cocheok opened this issue Oct 8, 2015 · 2 comments

Comments

@cocheok
Copy link

cocheok commented Oct 8, 2015

When I import my project as a AMD object it says. "Uncaught Error: No fs" And i don't use fs in my project.

@cocheok
Copy link
Author

cocheok commented Oct 8, 2015

Gruntfile.js

requirejs: {
compile: {
options: {
baseUrl : "src",
include : ['myProject'],
name : '../bower_components/almond/almond',
wrap : {
startFile: 'config/start.frag',
endFile : 'config/end.frag'
},
skipModuleInsertion: false,
mainConfigFile : "require-config.js",
out : "dist/myProject.js", // output file
optimize : 'none' // optimise js code
}
}
}
start.frag
// Details: https://github.com/jrburke/almond#exporting-a-public-api
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
//Allow using this built library as an AMD module
//in another project. That other project will only
//see this AMD call, not the internal modules in
//the closure below.
define([], factory);
} else {
//Browser globals case. Just assign the
//result to a property on the global.
root.MyProject = factory();
}
}(this, function () {

end.frag

//The modules for your project will be inlined above
//this snippet. Ask almond to synchronously require the
//module value for 'main' here and return it as the
//value to use for the public API for the built file.
return requirejs('myProject');

}));

As no AMD it works fine but the problem is when I use as an AMD object.

@ooxi
Copy link

ooxi commented Oct 8, 2015

Please provide the full error message including stack trace. Also consider formatting your code using Markdown it's really simple but necessary to read your input :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants