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
Running one of the format* npm scripts fails, when there is a space in the absolute path to the workspace. Unfortunately format:write is called when a new app or Angular module lib is created.
In my case:
> my-workspace@0.0.0 format /Users/My Name/Documents/Development/my-workspace
> nx format write
module.js:549
throw err;
^
Error: Cannot find module '/Users/My'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
child_process.js:644
throw err;
^
Error: Command failed: node /Users/My Name/Documents/Development/my-workspace/node_modules/prettier/bin-prettier.js --single-quote --print-width 120 --write "{apps,libs}/**/*.ts"
at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at write (/Users/My Name/Documents/Development/my-workspace/node_modules/@nrwl/schematics/src/command-line/format.js:58:25)
at Object.format (/Users/My Name/Documents/Development/my-workspace/node_modules/@nrwl/schematics/src/command-line/format.js:19:13)
at Object.<anonymous> (/Users/My Name/Documents/Development/my-workspace/node_modules/@nrwl/schematics/src/command-line/nx.js:15:18)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
I think the code which needs to be changed is this one:
Since this kinda "blocks" the creation of apps and libs, the easiest workaround is to disable the format* scripts like described here: #306 (comment)
I'm using version 0.8.0.
Edit: And I'm on a Mac.
The text was updated successfully, but these errors were encountered:
MaGnaL
changed the title
format* can't resolve to "bin-prettier.js" with a space in absolute path
"format*" script can't resolve to "bin-prettier.js" with a space in absolute path
Mar 11, 2018
Running one of the
format*
npm scripts fails, when there is a space in the absolute path to the workspace. Unfortunatelyformat:write
is called when a new app or Angular module lib is created.In my case:
I think the code which needs to be changed is this one:
nx/packages/schematics/src/command-line/format.ts
Lines 57 to 80 in b17b186
Since this kinda "blocks" the creation of apps and libs, the easiest workaround is to disable the
format*
scripts like described here: #306 (comment)I'm using version 0.8.0.
Edit: And I'm on a Mac.
The text was updated successfully, but these errors were encountered: