Hello,
I have installed framework CLI and tried to create a new app for the first time
Then, folowing the instructions executed framework7 create
After I chose starter template I got an error:
C:\Users\Microsoft\Documents\VS Code\testFr7>framework7 create
√ All good, you have latest framework7-cli version.
? What type of the app are you targeting? Simple web app
? App (project) name: Test
? What type of framework do you prefer? Framework7 Core
? Choose starter template: Single View
? Should we setup project with bundler? Webpack (recommended)
? Do you want to setup CSS Pre-Processor SCSS (SASS)
? Do you want to specify custom theme color? No, use default color theme
? Do you want to include Framework7 Icons and Material Icons icon fonts? Yes, include icon fonts
√ Generating package.json
√ Creating required folders structure
× Error installing NPM Dependencies
npm ERR! Line breaks can't be quoted on Windows
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Microsoft\AppData\Local\npm-cache\_logs\2020-12-06T13_29_37_005Z-debug.log
There is th log of the run:
0 verbose cli [
0 verbose cli ‘C:\Program Files\nodejs\node.exe’,
0 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
0 verbose cli ‘install’,
0 verbose cli ‘framework7@5’,
0 verbose cli ‘dom7@2’,
0 verbose cli ‘template7’,
0 verbose cli ‘framework7-icons’,
0 verbose cli ‘–save’
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:C:\Users\Microsoft\Documents\VS Code\testFr7.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:C:\Users\Microsoft.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\Microsoft\AppData\Roaming\npm\etc\npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 6ms
19 verbose npm-session 39e04688aa6d9e9f
20 timing npm:load Completed in 12ms
21 timing arborist:ctor Completed in 0ms
22 timing arborist:ctor Completed in 0ms
23 timing idealTree:init Completed in 13ms
24 timing idealTree:userRequests Completed in 4ms
25 silly idealTree buildDeps
26 silly fetch manifest framework7@5
27 http fetch GET 304 https://registry.npmjs.org/framework7 105ms (from cache)
28 silly fetch manifest dom7@2
29 http fetch GET 304 https://registry.npmjs.org/dom7 66ms (from cache)
30 silly fetch manifest template7@*
31 http fetch GET 304 https://registry.npmjs.org/template7 22ms (from cache)
32 silly fetch manifest framework7-icons@*
33 http fetch GET 304 https://registry.npmjs.org/framework7-icons 30ms (from cache)
34 silly placeDep ROOT [email protected] OK for: [email protected] want: 2
35 silly placeDep ROOT [email protected] OK for: [email protected] want: 5
36 silly placeDep ROOT [email protected] OK for: [email protected] want: *
37 silly placeDep ROOT [email protected] OK for: [email protected] want: *
38 silly fetch manifest ssr-window@^2.0.0
39 silly fetch manifest path-to-regexp@^6.1.0
40 http fetch GET 304 _https://registry.npmjs.org/ssr-window 33ms (from cache)
41 http fetch GET 304 _https://registry.npmjs.org/path-to-regexp 33ms (from cache)
42 timing idealTree:#root Completed in 271ms
43 silly placeDep ROOT [email protected] OK for: [email protected] want: ^2.0.0
44 timing idealTree:node_modules/dom7 Completed in 1ms
45 silly placeDep ROOT [email protected] OK for: [email protected] want: ^6.1.0
46 timing idealTree:node_modules/framework7 Completed in 2ms
47 timing idealTree:node_modules/framework7-icons Completed in 0ms
48 timing idealTree:node_modules/path-to-regexp Completed in 0ms
49 timing idealTree:node_modules/ssr-window Completed in 0ms
50 timing idealTree:node_modules/template7 Completed in 0ms
51 timing idealTree:buildDeps Completed in 275ms
52 timing idealTree:fixDepFlags Completed in 1ms
53 timing idealTree Completed in 293ms
54 timing reify:loadTrees Completed in 293ms
55 timing reify:diffTrees Completed in 1ms
56 silly reify moves {}
57 timing reify:retireShallow Completed in 0ms
58 timing reify:createSparse Completed in 2ms
59 timing reify:loadBundles Completed in 0ms
60 timing reifyNode:node_modules/path-to-regexp Completed in 152ms
61 timing reifyNode:node_modules/ssr-window Completed in 157ms
62 timing reifyNode:node_modules/template7 Completed in 164ms
63 timing reifyNode:node_modules/dom7 Completed in 169ms
64 timing reifyNode:node_modules/framework7-icons Completed in 668ms
65 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 838ms
66 timing auditReport:getReport Completed in 840ms
67 timing auditReport:init Completed in 0ms
68 timing reify:audit Completed in 840ms
69 timing reifyNode:node_modules/framework7 Completed in 959ms
70 timing reify:unpack Completed in 960ms
71 timing reify:unretire Completed in 0ms
72 timing build:queue Completed in 1ms
73 info run [email protected] postinstall node_modules/framework7 echo "e[35me[1mLove Framework7? Support project by donating or pledging on patreon:e[22me[39m
73 info run > e[32mhttps://patreon.com/vladimirkharlampidie[0m
73 info run "
74 info run [email protected] postinstall { code: undefined, signal: undefined }
75 timing reify:rollback:createSparse Completed in 0ms
76 timing reify:rollback:retireShallow Completed in 0ms
77 timing command:install Completed in 1265ms
78 verbose stack Error: Line breaks can’t be quoted on Windows
78 verbose stack at quoteForCmd (C:\Program Files\nodejs\node_modules\npm\node_modules\puka\index.js:41:11)
78 verbose stack at Formatter.quote (C:\Program Files\nodejs\node_modules\npm\node_modules\puka\index.js:256:12)
78 verbose stack at quoteForShell (C:\Program Files\nodejs\node_modules\npm\node_modules\puka\index.js:743:34)
78 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script\lib\make-spawn-args.js:13:90
78 verbose stack at Array.map ()
78 verbose stack at escapeCmd (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script\lib\make-spawn-args.js:13:75)
78 verbose stack at makeSpawnArgs (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script\lib\make-spawn-args.js:37:43)
78 verbose stack at runScriptPkg (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script\lib\run-script-pkg.js:54:29)
78 verbose stack at runScript (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script\lib\run-script.js:9:16)
78 verbose stack at Array. (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\rebuild.js:264:17)
79 verbose cwd C:\Users\Microsoft\Documents\VS Code\testFr7
80 verbose Windows_NT 10.0.18363
81 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “framework7@5” “dom7@2” “template7” “framework7-icons” “–save”
82 verbose node v15.3.0
83 verbose npm v7.0.14
84 error Line breaks can’t be quoted on Windows
85 verbose exit 1
I did try it today in VSCode for Windows with latest versions of node and npm installed and also failed to create an app with framework7 CLI with the same error.
Should it look after following steps like that?
if (/[\n\r]/.test(text)) {
// throw new Error(“Line breaks can’t be quoted on Windows”);
text.replace(/[\n\r]/,’ ')
}
In the text.replace(/[\n\r]/,’ ') did you mean in the second parametr single quotes?
If yes - I still have the same error
If no - I have the next error:
C:\Program Files\nodejs\node_modules\npm\node_modules\puka\index.js:42
text.replace(/[\n\r]/, ’ ');
SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1024:16)
at Module._compile (node:internal/modules/cjs/loader:1072:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script\lib\make-spawn-args.js:6:78)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\config\lib\index.js:163
throw new Error('call config.load() before reading values')
^
Error: call config.load() before reading values
at Config.get (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\config\lib\index.js:163:13)
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:177:32)
at process.emit (node:events:376:20)
at process._fatalException (node:internal/process/execution:163:25)
C:\Program Files\nodejs\node_modules\npm\node_modules\puka\index.js:42
text.replace(/[\n\r]/, ’ ');
SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1024:16)
at Module._compile (node:internal/modules/cjs/loader:1072:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script\lib\make-spawn-args.js:6:78)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\config\lib\index.js:163
throw new Error('call config.load() before reading values')
^
Error: call config.load() before reading values
at Config.get (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\config\lib\index.js:163:13)
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:177:32)
at process.emit (node:events:376:20)
at process._fatalException (node:internal/process/execution:163:25)
had installed node via chocolatey (in my system) completely uninstalled node via chocolatey then installed node from there official site now, here framework7 project running well