You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the document structure:
js
-- login.js
libs
--ejs/ejs
--requirejs-ejs-plugin/rejs
when run 'requirejs:compile' task throw error:
[INFO] Running "requirejs:compile" (requirejs) task
[INFO] ReferenceError: ejs is not defined
[INFO] In module tree:
[INFO] login
[INFO] tpl
[INFO] ejs
[INFO]
[INFO] { Error: ReferenceError: ejs is not defined
[INFO] In module tree:
[INFO] login
[INFO] tpl
[INFO] ejs
[INFO]
[INFO] at eval (eval at (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25281:64), :1:1)
[INFO]
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25865:19
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3056:39
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2996:25
[INFO] at Function.prim.nextTick (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25616:9)
[INFO] at Object.errback (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2995:26)
[INFO] at Object.callback (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2981:23)
[INFO] at Object.then (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3035:23)
[INFO] at build (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25822:12)
[INFO] at runBuild (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:27831:17)
[INFO] at Object.execCb (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:1943:33)
[INFO] originalError:
[INFO] { ReferenceError: ejs is not defined
[INFO] at eval (eval at (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25281:64), :1:1)
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25281:55
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3038:37
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2986:25
[INFO] at Function.prim.nextTick (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25616:9)
[INFO] at Object.callback (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2985:26)
[INFO] at Object.then (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3035:23)
[INFO] at Object.context.load (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25269:28)
[INFO] at Object.load (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:1082:29)
[INFO] at Object. (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:1068:70)
[INFO] moduleTree: [ 'ejs', 'tpl', 'login' ],
[INFO] fileName: 'F:/fusionminer/visallo/git-workspace/visallo-git/web/war/src/main/webapp/jsc/ejs.js' } }
The text was updated successfully, but these errors were encountered:
miraclelife
changed the title
compiler throw error: shim with defined module cannot be evaluated correctly.
compile throw error: shim with defined module cannot be evaluated correctly.
Feb 8, 2017
@miraclelife I can't speak for jrburke but I think it would help immensely if you formatted your post so that the code showed up as a code block. You can write a code block like this:
config in gruntfile.js
requireConfig.paths = {
........
'ejs': '../libs/ejs/ejs',
'tpl': '../libs/requirejs-ejs-plugin/rejs'
}
requireConfig.shim = {
........
'ejs': { exports: 'ejs' }
}
requirejs: {
compile: {
options: {
dir: 'jsc',
wrap: true,
baseUrl: 'js',
preserveLicenseComments: false,
removeCombined: true,
findNestedDependencies: true,
useStrict: true,
optimize: 'uglify2',
generateSourceMaps: false,
inlineText: true,
wrapShim: true,
paths: requireConfig.paths,
shim: requireConfig.shim,
modules: [{
name: 'login'
}]
}
}
}
login.js
define([
'flight/lib/component',
'hbs!loginTpl',
'configuration/plugins/registry',
'util/withDataRequest',
'tpl!util/alert',
'util/requirejs/promise!util/service/propertiesPromise'
], function(
defineComponent,
template,
registry,
withDataRequest,
alertTemplate,
configProperties) {
'use strict';
............
});
the document structure:
js
-- login.js
libs
--ejs/ejs
--requirejs-ejs-plugin/rejs
when run 'requirejs:compile' task throw error:
[INFO] Running "requirejs:compile" (requirejs) task
[INFO] ReferenceError: ejs is not defined
[INFO] In module tree:
[INFO] login
[INFO] tpl
[INFO] ejs
[INFO]
[INFO] { Error: ReferenceError: ejs is not defined
[INFO] In module tree:
[INFO] login
[INFO] tpl
[INFO] ejs
[INFO]
[INFO] at eval (eval at (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25281:64), :1:1)
[INFO]
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25865:19
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3056:39
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2996:25
[INFO] at Function.prim.nextTick (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25616:9)
[INFO] at Object.errback (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2995:26)
[INFO] at Object.callback (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2981:23)
[INFO] at Object.then (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3035:23)
[INFO] at build (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25822:12)
[INFO] at runBuild (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:27831:17)
[INFO] at Object.execCb (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:1943:33)
[INFO] originalError:
[INFO] { ReferenceError: ejs is not defined
[INFO] at eval (eval at (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25281:64), :1:1)
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25281:55
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3038:37
[INFO] at F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2986:25
[INFO] at Function.prim.nextTick (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25616:9)
[INFO] at Object.callback (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:2985:26)
[INFO] at Object.then (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:3035:23)
[INFO] at Object.context.load (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:25269:28)
[INFO] at Object.load (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:1082:29)
[INFO] at Object. (F:\fusionminer\visallo\git-workspace\visallo-git\web\war\src\main\webapp\node_modules\requirejs\bin\r.js:1068:70)
[INFO] moduleTree: [ 'ejs', 'tpl', 'login' ],
[INFO] fileName: 'F:/fusionminer/visallo/git-workspace/visallo-git/web/war/src/main/webapp/jsc/ejs.js' } }
<node.version>v4.2.1</node.version>
<npm.version>3.3.8</npm.version>
requirejs -v 2.1.20
The text was updated successfully, but these errors were encountered: