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

Error in Grunt file for combined - individual Library Grunt commands working fine. #16

Open
danzen opened this issue Oct 24, 2020 · 3 comments

Comments

@danzen
Copy link

danzen commented Oct 24, 2020

Hi Folks,

I have successfully used Grunt to make each individual module without error. But when I run the grunt next (or grunt build) in the combined directory I get the following errors:

Loading "mxmlc.js" tasks...ERROR

Error: Cannot find module 'flex-sdk'

AND

E:\createjs\EaselJS\build\Gruntfile.js:
Could not find an option named "sourcemap".
Warning: Exited with error code 64 Use --force to continue.
Aborted due to warnings.

This repeats for each module.

As you can see in the log below, it seems to be SASS that is reporting the "sourcemap" issue and it gives a bunch of suggested commands including "source-map". I thought maybe that the sourcemap setting was changed to source-map and this was causing the problem. But when I update the code in the grunt file to source-map it gives me another error so I gave up.

It looks like it could be a quick fix for someone who knows what is going on in the Grunt file. And it would be great to be able to make a combined file so we can carry on here.

Thanks in advance.

Dan

E:\>cd createjs/combined

E:\createjs\Combined>grunt next
Running "start" task

Running "copyCommon" task
>> No files were copied.

Running "hub:next" (hub) task
>> Running [next:all] on E:\createjs\EaselJS\build\Gruntfile.js
>> Running [next:all] on E:\createjs\PreloadJS\build\Gruntfile.js
>> Running [next:all] on E:\createjs\SoundJS\build\Gruntfile.js
>> Running [next:all] on E:\createjs\TweenJS\build\Gruntfile.js


>> E:\createjs\PreloadJS\build\Gruntfile.js:

Running "next:all" (next) task

Running "updateversion:preload" (updateversion) task

Running "concat:build" (concat) task


>> E:\createjs\SoundJS\build\Gruntfile.js:

Loading "mxmlc.js" tasks...ERROR
>> Error: Cannot find module 'flex-sdk'
>> Require stack:
>> - E:\createjs\SoundJS\build\node_modules\grunt-mxmlc\tasks\mxmlc.js
>> - E:\createjs\SoundJS\build\node_modules\grunt\lib\grunt\task.js
>> - E:\createjs\SoundJS\build\node_modules\grunt\lib\grunt.js
>> - C:\Users\danzen\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt


>> E:\createjs\PreloadJS\build\Gruntfile.js:

File output/preloadjs-NEXT.js created.

Running "uglify:build" (uglify) task


>> E:\createjs\SoundJS\build\Gruntfile.js:


Running "next:all" (next) task

Running "updateversion:sound" (updateversion) task

Running "updateversion:flashaudioplugin" (updateversion) task

Running "updateversion:cordovaaudioplugin" (updateversion) task

Running "concat:build" (concat) task


>> E:\createjs\TweenJS\build\Gruntfile.js:

Running "next:all" (next) task

Running "updateversion:tween" (updateversion) task

Running "concat:build" (concat) task
File output/tweenjs-NEXT.js created.

Running "uglify:build" (uglify) task


>> E:\createjs\SoundJS\build\Gruntfile.js:

File output/soundjs-NEXT.js created.
File output/flashaudioplugin-NEXT.js created.
File output/cordovaaudioplugin-NEXT.js created.

Running "uglify:build" (uglify) task


>> E:\createjs\EaselJS\build\Gruntfile.js:

Running "next:all" (next) task

Running "sass:docs" (sass) task


>> E:\createjs\TweenJS\build\Gruntfile.js:

>> 1 file created.

Running "clearversion:tween" (clearversion) task

Running "sass:docs" (sass) task


>> E:\createjs\EaselJS\build\Gruntfile.js:

Could not find an option named "sourcemap".

Usage: sass <input.scss> [output.css]
       sass <input.scss>:<output.css> <input/>:<output/> <dir/>

=== Input and Output ===================
    --[no-]stdin               Read the stylesheet from stdin.
    --[no-]indented            Use the indented syntax for input from stdin.
-I, --load-path=<PATH>         A path to use when resolving imports.
                               May be passed multiple times.
-s, --style=<NAME>             Output style.
                               [expanded (default), compressed]
    --[no-]charset             Emit a @charset or BOM for CSS with non-ASCII characters.
                               (defaults to on)
    --[no-]error-css           When an error occurs, emit a stylesheet describing it.
                               Defaults to true when compiling to a file.
    --update                   Only compile out-of-date stylesheets.

=== Source Maps ========================
    --[no-]source-map          Whether to generate source maps.
                               (defaults to on)
    --source-map-urls          How to link from source maps to source files.
                               [relative (default), absolute]
    --[no-]embed-sources       Embed source file contents in source maps.
    --[no-]embed-source-map    Embed source map contents in CSS.

=== Other ==============================
    --watch                    Watch stylesheets and recompile when they change.
    --[no-]poll                Manually check for changes rather than using a native watcher.
                               Only valid with --watch.
    --[no-]stop-on-error       Don't compile more files once an error is encountered.
-i, --interactive              Run an interactive SassScript shell.
-c, --[no-]color               Whether to use terminal colors for messages.
    --[no-]unicode             Whether to use Unicode characters for messages.
-q, --[no-]quiet               Don't print warnings.
    --[no-]trace               Print full Dart stack traces for exceptions.
-h, --help                     Print this usage information.
    --version                  Print the version of Dart Sass.
Warning: Exited with error code 64 Use --force to continue.

Aborted due to warnings.

It goes on to do three more of these errors for the other three libraries.

@wdamien
Copy link
Member

wdamien commented Oct 26, 2020

For the flex-sdk issue, it would be best to just remove that from the SoundJS build, since that plugin will never be updated anyways.

As for sass, theres a much newer version of grunt-contrib-sass so upgrading that should work (or downgrade your local sass version to a version that supports the sourcemap flag). Or the quick "fix" is to force the build grunt build --force, the docs might get messed up without updated css, but the source will build fine.

@danzen
Copy link
Author

danzen commented Oct 27, 2020

Thanks @wdamien! I did get the latest version of sass to run this (never had sass before). So where would the upgrading the grunt-contrib-sass happen? I don't mind running it with the --force as I don't need the docs right now... but maybe will need it in the future.

@danzen
Copy link
Author

danzen commented Oct 27, 2020

Woot! The grunt build --force worked to give a combined file in the build directory. Cheers.

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