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

Errors upgrading from 2.2.0 to 2.3.x #933

Closed
chrswk opened this issue Sep 15, 2016 · 3 comments
Closed

Errors upgrading from 2.2.0 to 2.3.x #933

chrswk opened this issue Sep 15, 2016 · 3 comments
Milestone

Comments

@chrswk
Copy link

@chrswk chrswk commented Sep 15, 2016

I tried to update our existing web projects from 2.2.0 to 2.3.0/2.3.1 and get the following errors. I couldn't find a existing issue or something in the change notes that would hint at what could cause this. I'm fine with running 2.2.0, but thought I would share. This is running on Windows 10 with Java 1.8.0_66 (64-bit, Server VM).

2.2.0 (File Ref)

jjs -scripting src\main\resources\lib\r.js -- -o build.js dir=target\dist
Optimizing (standard.keepLines.keepWhitespace) CSS file: (...)
Optimizing (standard.keepLines.keepWhitespace) CSS file: (...)
Optimizing (standard.keepLines.keepWhitespace) CSS file: (...)
Optimizing (standard.keepLines.keepWhitespace) CSS file: (...)

Tracing dependencies for: (...)

Tracing dependencies for: (...)

(...)

2.3.0: (File Ref)

jjs -scripting src\main\resources\lib\r.js -- -o build.js dir=target\dist
src\main\resources\lib\r.js:22357:8 In strict mode, function declarations can only occur at program or function body level. You should use a function expression here instead.
        function addFile(file, fileUrl) {
        ^
src\main\resources\lib\r.js:22447:1 Expected , but found ;
};
 ^
src\main\resources\lib\r.js:22498:1 Expected ; but found )
});
 ^
src\main\resources\lib\r.js:27768:4 Expected ) but found function
    function setBaseUrl(fileName) {
    ^
src\main\resources\lib\r.js:27778:4 Expected eof but found }
    }
    ^

2.3.1 (Current Master)

jjs -scripting src\main\resources\lib\r.js -- -o build.js dir=target\dist
src\main\resources\lib\r.js:260 ReferenceError: "setTimeout" is not defined
@jrburke
Copy link
Member

@jrburke jrburke commented Sep 16, 2016

I think this was caused by a problem with a change in 2.3.0, filed requirejs/requirejs#1588 to track the fix, and I just pushed a change to this repo to include that fix in r.js. You can try it to confirm if it fixes the problem by using the latest r.js snapshot:

https://raw.githubusercontent.com/requirejs/r.js/master/dist/r.js

Please post back to let me know if it fixes the problem, and then I'll schedule a 2.3.2 sooner rather than later to get this in an official release.

@chrswk
Copy link
Author

@chrswk chrswk commented Sep 16, 2016

I can confirm that this fixes the issue. The build runs without errors.

Thank you!

@jrburke
Copy link
Member

@jrburke jrburke commented Sep 17, 2016

2.3.2 has been released with this fix.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.